Re: Problems integrating InterpolatingFunction

*To*: mathgroup at smc.vnet.net*Subject*: [mg116050] Re: Problems integrating InterpolatingFunction*From*: Gary Wardall <gwardall at gmail.com>*Date*: Sun, 30 Jan 2011 03:32:47 -0500 (EST)*References*: <ii2c82$ra6$1@smc.vnet.net>

On Jan 29, 6:43 pm, Sergio Miguel Terrazas Porras <sterr... at uacj.mx> wrote: > Hello group, > > I use NDSolve for a nonlinear differential equation, and I get an InterpolatingFunction, as expected. > > I can plot it, evaluate it, etc. > > The problem I have is that now I need to integrate 1/(the square of the InterpolatingFunction), and I get nothing but the input back. > > Any ideas? > > Thanks in advance. > > Sergio Terrazas I'm a bit rusty with my ODE theory but you might try restating your problem in terms of a system of ODE's. Suppose: y1=92=f(x) & f(x0)=y10 (The function you used with NDSolve on originally.) With: y2=Integral( 1/(f(x)^2 ) (The function you really want at the end.) So: y2=92=1/(y1)^2 Then the system to solve would be: y1=92=f(x) & y1(x0)=y10 y2=92=1/(y1)^2 & y2(x0)=0 I hope this or a some variation should be of some help. Gary Wardall