Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: A simple ordinary differential equation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98240] Re: A simple ordinary differential equation
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Fri, 3 Apr 2009 04:37:39 -0500 (EST)
  • References: <gr21kh$lpg$1@smc.vnet.net>

In the definition of f you specify a derivative of f, but Mathematica
cannot know  that it is supposed to be a dervative with respect to t.
And, BTW, Sqr should be Sqrt.

A few quick fixes:
Clear[sol]
f = 1 - 1111*x'[t]^2;
sol = NDSolve[{x''[t] + (16/10^4) x'[t]^2*
      Sqrt[f]/x[t]^2 - (1458/10^9)*f/x[t]^2 == 0, x[0] == 1,
   x'[0] == 0}, x[t], {t, 0, 100}, AccuracyGoal -> 8,
  PrecisionGoal -> 8, WorkingPrecision -> 30, MaxSteps -> Infinity]
Plot[D[x[t] /. sol, t] // Evaluate, {t, 0, 100}, PlotRange -> All,
 Frame -> True, Axes -> None

Cheers -- Sjoerd


On Apr 2, 11:48 am, "I. Shechtman" <shech... at netvision.net.il> wrote:
> What is wrong with this equation?
>
> Clear[sol]
> f[x_?NumericQ] = 1 - 1111*x'^2;
> sol = NDSolve[{x''[t] + (16/10^4)x'[t]^2*Sqr[
> f[x[t]]]/x[
>     t]^2 - (1458/10^9)*f[x[t]]/x[t]^2 ==
>             0, x[0] == 1, x'[0] == 0}, x[t], {
>               t, 0, 100}, AccuracyGoal -> 8,
>                      PrecisionGoal -> 8, WorkingPre=
cision ->
>                   30, MaxSteps -> Infinity];
> Plot[Evaluate[x'[t] /. sol], {t, 0, 100}]



  • Prev by Date: Re: Update to Hinton Button/palette tutorial for Mathematica 7?
  • Next by Date: Re: Joust in Mathematica
  • Previous by thread: Re: A simple ordinary differential equation
  • Next by thread: Interpolation: Method->"Spline"