Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4154 > unrolled thread
| Started by | math_new <dom.woe@gmail.com> |
|---|---|
| First post | 2011-08-03 11:13 +0000 |
| Last post | 2011-08-03 23:23 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Integrating Interpolating function math_new <dom.woe@gmail.com> - 2011-08-03 11:13 +0000
Re: Integrating Interpolating function "Kevin J. McCann" <Kevin.McCann@umbc.edu> - 2011-08-03 23:23 +0000
| From | math_new <dom.woe@gmail.com> |
|---|---|
| Date | 2011-08-03 11:13 +0000 |
| Subject | Integrating Interpolating function |
| Message-ID | <j1bag4$ami$1@smc.vnet.net> |
Hi,
I solve a system of differential equations using NDSolve up to time
t_end. which gives me something like
sol = {f->InterpolatingFunction}
Now I want to do an integral like that
Integrate[t*f[t],{t,0,tend}]
but it won't be computed. What am I doing wrong?
Cheers
[toc] | [next] | [standalone]
| From | "Kevin J. McCann" <Kevin.McCann@umbc.edu> |
|---|---|
| Date | 2011-08-03 23:23 +0000 |
| Message-ID | <j1cl9s$g5n$1@smc.vnet.net> |
| In reply to | #4154 |
Try this.
F = f/.sol
NIntegrate[t F[t],{t,0,tend}] (* You need to numerically integrate *)
Cheers,
Kevin
On 8/3/2011 7:13 AM, math_new wrote:
> Hi,
>
> I solve a system of differential equations using NDSolve up to time
> t_end. which gives me something like
>
> sol = {f->InterpolatingFunction}
>
> Now I want to do an integral like that
>
> Integrate[t*f[t],{t,0,tend}]
>
> but it won't be computed. What am I doing wrong?
>
> Cheers
>
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web