Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15999 > unrolled thread
| Started by | Sergio Miguel Terrazas Porras <sterraza@uacj.mx> |
|---|---|
| First post | 2011-01-31 08:24 +0000 |
| Last post | 2011-01-31 08:24 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: Problems integrating InterpolatingFunction Sergio Miguel Terrazas Porras <sterraza@uacj.mx> - 2011-01-31 08:24 +0000
| From | Sergio Miguel Terrazas Porras <sterraza@uacj.mx> |
|---|---|
| Date | 2011-01-31 08:24 +0000 |
| Subject | Re: Problems integrating InterpolatingFunction |
| Message-ID | <ii5rkl$fjp$1@smc.vnet.net> |
Hi again, the thing is that I need a function as a result of the integration, no a number.
I can make a very long table of the results of NIntegrate, then try to fit the elements of Table, etc.
I just needed to know if it was possible to obtain a function directly from the indefinite integral.
In the documentation there is an example of an indefinte integral of an InterpolatinFuntion.
Thanks to all who responded.
Sergio
________________________________________
De: Bob Hanlon [hanlonr@cox.net]
Enviado el: domingo, 30 de enero de 2011 01:32 a.m.
Para: mathgroup@smc.vnet.net
Asunto: Re: Problems integrating InterpolatingFunction
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
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web