Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15745 > unrolled thread

Re: Problems integrating InterpolatingFunction

Started byOliver Ruebenkoenig <ruebenko@googlemail.com>
First post2011-02-01 11:50 +0000
Last post2011-02-01 11:50 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Problems integrating InterpolatingFunction Oliver Ruebenkoenig <ruebenko@googlemail.com> - 2011-02-01 11:50 +0000

#15745 — Re: Problems integrating InterpolatingFunction

FromOliver Ruebenkoenig <ruebenko@googlemail.com>
Date2011-02-01 11:50 +0000
SubjectRe: Problems integrating InterpolatingFunction
Message-ID<ii8s2b$2i3$1@smc.vnet.net>
On Sun, 30 Jan 2011, Sergio Miguel Terrazas Porras 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
>
>

Sergio,

here is an example

s = NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 30}]
Plot[Evaluate[y[x] /. s], {x, 0, 30}, PlotRange -> All]

if = Evaluate[y[x] /. s][[1]]

NIntegrate[if, {x, 0, 30}]

Hope this helps,

Oliver

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web