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


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

Re: NDSolve with NIntegrate where Integral is a function of x

Started byBob Hanlon <hanlonr357@gmail.com>
First post2012-07-20 07:59 +0000
Last post2012-07-20 07:59 +0000
Articles 1 — 1 participant

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


Contents

  Re: NDSolve with NIntegrate where Integral is a function of x Bob Hanlon <hanlonr357@gmail.com> - 2012-07-20 07:59 +0000

#11003 — Re: NDSolve with NIntegrate where Integral is a function of x

FromBob Hanlon <hanlonr357@gmail.com>
Date2012-07-20 07:59 +0000
SubjectRe: NDSolve with NIntegrate where Integral is a function of x
Message-ID<jub34i$eja$1@smc.vnet.net>
You did not specify g[x,t] so I could not verify that this will work.

You also need to pay closer attention to syntax.

h[x_?NumericQ] := Integrate[g[x, t], {t, 0, Infinity}]

NDSolve[{y'[x] == f[x]*h[x], y[0] == 0.04}, y[x], {x, 0, 10}]


Bob Hanlon


On Thu, Jul 19, 2012 at 3:50 AM, Nikthecrab <nikhil.dexter@gmail.com> wrote:
> I am trying to solve a differential equation using NDSolve . It is of the form:
>
> NDSolve[{y'[x]=f(x)*Integrate[g(x,t),{t,0,infinity}],y[0]=0.04},y[x],{x,0,10}]
>
> here f is a function of x and g is a function of x and a dummy variable t for integration.
> The integral cannot be solved directly in terms of x.So I tried using NIntegrate.But NIntegrate requires x to be a number while NDSolve clearly has to vary x from 0 to 10. Can anyone suggest a suitable solution to this problem?
>

[toc] | [standalone]


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


csiph-web