Re: Operations on InterpolatingFunction
- To: mathgroup at smc.vnet.net
- Subject: [mg100855] Re: Operations on InterpolatingFunction
- From: dh <dh at metrohm.com>
- Date: Tue, 16 Jun 2009 21:52:04 -0400 (EDT)
- References: <h0t846$r6n$1@smc.vnet.net>
Hi Porscha,
obviously there are only rules to integrate InterpolatingFunctions but
none for functions of InterpolatingFunctions.
You could add such rules, but it is easier to write the "function of a
InterpolatingFunction" as an InterpolatingFunction.
E.g. your case:
ifun2 = FunctionInterpolation[ifun[x]^2, {x, 0, Pi}]
Now you can integrate ifun2:
Integrate[ifun2[t], t]
hope this helps, Daniel
Porscha Louise McRobbie wrote:
> Hi,
>
> Solving a simple differential equation:
> ifun = First[
> u /. NDSolve[{u''[t] + u[t] == 0, u[0] == 0, u'[0] == 1},
> u, {t, 0, \[Pi]}]]
>
> returns the InterpolationFunction object, as expected. I can integrate
> this function (and obtain another InterpolatingFunction to be plotted,
> etc.) by:
>
> Integrate[ifun[t], t]
>
> 1. Why doesn't the following produce an InterpolatingFunction in the same way?
>
> Integrate[ifun[t]^2, t]
>
> 2. How can I normalize the solutions found using NDSolve?
> Norm[ifunt[t]] doesn't work...
>
> Thanks for any help.
>
>
>
>
>
>