Re: Fitting a inverse function from complicated integral

*To*: mathgroup at smc.vnet.net*Subject*: [mg87232] Re: [mg87210] Fitting a inverse function from complicated integral*From*: Darren Glosemeyer <darreng at wolfram.com>*Date*: Sat, 5 Apr 2008 04:21:08 -0500 (EST)*References*: <200804040757.CAA03920@smc.vnet.net>

tibor dubaj wrote: > Dear Group, > > I need to Fit this experimental data {x, OOT}: > > data = { > {1, 444.6}, > {3, 455.15}, > {5, 464.81}, > {7, 467.79}, > {10, 469.01}, > {15, 480.28}} > > But there is a big problem with model equation: > > x = Integrate[A*Exp[-B/T], {T, 0, OOT}, Assumptions -> A > 0 && B > 0 > && OOT > 0] > > So, after integration: > > x = A (Exp[-B/OOT] OOT - B Gamma[0, B/OOT]) > > I need to obtain a INVERSE function, i.e. OOT = f(x) and then find > (e.g. via FindFit) best fitting parameters A, B. > > I have tried Series expansion, PadeApproximant etc., but every > approximation of mentioned > model contain A*Exp[-B/T], so I cannot find inverse function. > > Can Somebody help me with this problem? > > > ***************** > $Version > 6.0 for Microsoft Windows (32-bit) (February 7, 2008) > > Assuming you are really just after the parameter estimates and attempting to symbolically invert the function is just a means to an end, one possibility is to define the model as a black box function that solves the equation numerically. This can be done using FindRoot. In[1]:= data = {{1, 444.6}, {3, 455.15}, {5, 464.81}, {7, 467.79}, {10, 469.01}, {15, 480.28}}; In[2]:= model[A_?NumericQ, B_?NumericQ, x_?NumericQ] := Module[{OOT}, (OOT /. FindRoot[ x == A (Exp[-B/OOT] OOT - B Gamma[0, B/OOT]), {OOT, 450, 500}])] In[3]:= FindFit[data, model[A, B, x], {{A, 7*10^13}, {B, 15000}}, x] 14 Out[3]= {A -> 3.23774 10 , B -> 15914.5} For the starting values for A and B, I took values close to those obtained by plugging the first and last data points into the equation and solving for A and B. Darren Glosemeyer Wolfram Research

**References**:**Fitting a inverse function from complicated integral***From:*tibor dubaj <t.dubaj@gmail.com>