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


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

Re: Problems integrating InterpolatingFunction

Started byBob Hanlon <hanlonr@cox.net>
First post2011-01-30 08:32 +0000
Last post2011-01-30 08:32 +0000
Articles 1 — 1 participant

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


Contents

  Re: Problems integrating InterpolatingFunction Bob Hanlon <hanlonr@cox.net> - 2011-01-30 08:32 +0000

#15719 — Re: Problems integrating InterpolatingFunction

FromBob Hanlon <hanlonr@cox.net>
Date2011-01-30 08:32 +0000
SubjectRe: Problems integrating InterpolatingFunction
Message-ID<ii37mr$41g$1@smc.vnet.net>
You must use NIntegrate

s = y /. NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, 
     y, {x, 0, 30}][[1]];

NIntegrate[1/s[x]^2, {x, 0, 30}]

10325.5


Bob Hanlon

---- Sergio Miguel Terrazas Porras <sterraza@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

[toc] | [standalone]


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


csiph-web