Re: Using InterpolatingFunction from NDSolve
- To: mathgroup at smc.vnet.net
- Subject: [mg58566] Re: Using InterpolatingFunction from NDSolve
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Fri, 8 Jul 2005 00:45:57 -0400 (EDT)
- Organization: Uni Leipzig
- References: <daitir$su4$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
since you avoid to give us an example here is how
to do it
in a 1d case:
Needs["DifferentialEquations`NDSolveUtilities`"]
sol = x[t] /.
NDSolve[{x''[t] + x[t] == 0, x[0] == 1, x'[0] ==
0},
x[t], {t, 0, 2Pi}][[1]];
sqrsol = Interpolation[
Transpose@{DifferentialEquations`NDSolveUtilities`Private`GetTimeData[sol],
DifferentialEquations`NDSolveUtilities`Private`GetGridData[sol]^2}][t]
and here is the square of the solution
Plot[sqrsol, {t, 0, 2Pi}]
Regards
Jens
"Tamás" <tladics at math.bme.hu> schrieb im
Newsbeitrag news:daitir$su4$1 at smc.vnet.net...
>I solved a PDE with NDSolve in Mathematica 5.1. I
>could plot,
> differentiate and integrate the obtained
> InterpolatingFunction object,
> the result being a similar object. I was able to
> integrate the 2nd
> derivative of it. What I need is to integrate
> the square of the
> obtained InterpolatingFunction object (the
> square itself does not
> simplify to such an object).
> You can see the details on my homepage:
> http://www.math.bme.hu/~tladics/nds.nb
>
> Every suggestions are welcome!
>
> Thank you,
> Tamás
>