       Re: Inv.Interpol.Function

• To: mathgroup at smc.vnet.net
• Subject: [mg36720] Re: Inv.Interpol.Function
• From: Erich Mueller <emueller at mps.ohio-state.edu>
• Date: Fri, 20 Sep 2002 04:16:40 -0400 (EDT)
• Organization: Ohio State University
• References: <am95s4\$k3d\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```A slick way to solve this particular problem is to use NDSolve.  The
inverse function t[y] sattisfies the differential equation

t'[y]==1/R[t[y]]^4

with the inital condition

t==0

So the following command should give an interpolating function for t[y]
(you should change the 1 in {y,0,1} to whatever the appropriate value is)

NDSolve[{t'[y]==1/R[t[y]]^4,t==0},t,{y,0,1}]

Erich

On Wed, 18 Sep 2002, martin skogstad wrote:

> Dear NG
>
>
> Mabye this is too simple, but I cant just figure it out
>
> I want to get an inverse function for y[t] where
>
> y[t_]:=NIntegrate[R[x]^4,{x,0,t}] /. ndsolution[]
> and
> R[t] is an interpolatingfunction(R>0 from NDSolve) on the interval 0=<t=<T
>
> after that I hope to be able to calculate the integral :
>
> a = (1/y[T])*
>         NIntegrate[R[InvFunction[y[t]]*Cos[y[t]], {y[t], 0, y[T]}]
>
> it works with a constant instead of R[t].
>
> Hope you can help, and that the above is understandable.
>
>