       Re: inverse of calculation

• To: mathgroup at smc.vnet.net
• Subject: [mg97620] Re: inverse of calculation
• From: dh <dh at metrohm.com>
• Date: Tue, 17 Mar 2009 04:59:06 -0500 (EST)
• References: <gphdoe\$oit\$1@smc.vnet.net>

```
Hi Erik,

if a numerical approximation is good enough you may simply calculate the

function to inverse for a number of {x,y} points. Then you exchange the

x and y: {y,x} and use Interpolation to get a function. Take care that

the function is invertible (no zeros). E.g.:

f1[x_] := Exp[x];

f2[x_] := x^2;

f3[x_] := f2[f1[x]];

Plot[f3[x], {x, 0, 3}]

dat = Reverse /@ Table[{x, f3[x]}, {x, 0, 3, .1}];

ListPlot[dat]

f4 = Interpolation[dat]

Plot[f4[x], {x, 1, 400}]

hope this helps, Daniel

Erik Henriksen wrote:

> hello everyone,

>

>

> i need assistance in inverting a calculation.  currently, i do the

> following:

>

> i have a dataset, D(x).  i wrote a notebook for a physical model of

> the process that produces the data.  there is a model function,

> (or ultimately let mathematica's nonlinearmodelfit do it for me).

> there are also other physical inputs, call them e(x), that describe

> parts of the system i'm studying.  in the end, i plot a curve F( e(x),

> d(a,b,c,x) ), and by varying the model parameters i try to find the

> d() that makes F look the most like D.

>

> i'd like to flip this process around.

>

> that is, i'd like to invert the calculation such that i input D(x) (or

> a smooth interpolation of it)  into Finv ( e(x), D(x) ) and get back a

> curve d(x).

>

> with a single function, i might just invert it.  however, F() here is

> actually a set of nested functions F(G(H(e(x),d(x))))=96 there's a

> number of effects i'm modeling=96, and so i'm unsure how to proceed.

> heck, i'm not sure it can be done in principle.

>

>

>

> thank you very much for any help.

>

> best,

> erik

>

>

```

• Prev by Date: Re: identical rows in tables
• Next by Date: Re: Don't understand the response
• Previous by thread: inverse of calculation
• Next by thread: Weird NMinimize behaviour