MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: question about ODE

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117873] Re: question about ODE
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sat, 2 Apr 2011 02:43:04 -0500 (EST)

On 4/1/11 at 2:34 AM, alexey_timohin at mail.ru wrote:

>How can I solve this ODE

>x''[t]=-NIntegrate[Sin[x'[t]*L], {L,0,1}] , x[0]=0, x'[0]=10

>The integral in this ODE must be evalueted in each step of solving
>ODE. But I don't know how can I realise it.

Don't use NIntegrate. Since the derivative x'[t] is independent
of the variable of integration, this integral is easily solved
by Integrate. So,

In[3]:= g = Integrate[Sin[x'[t]*y], {y, 0, 1}]

Out[3]= (1 - Cos[Derivative[1][x][t]])/Derivative[1][x][t]

Now the ODE is easily solved with

NDSolve[{x''[t] == -g, x[0] == 0, x'[0] == 10}, x, {t, -1, 1}]

Note, the use of "==" not "=" and I've replaced L with y as it
is unwise to use single uppercase letters as variables in
Mathematica. All to frequently, this will conflict with built-in
usage for these symbols.



  • Prev by Date: Re: Mathematica 8.01 and the CDF plug-in
  • Next by Date: Re: Wolfram, meet Stefan and Boltzmann
  • Previous by thread: Re: question about ODE
  • Next by thread: Re: question about ODE