MathGroup Archive 2009

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

Search the Archive

Re: Solving Weissinger's ODE

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104885] Re: [mg104842] Solving Weissinger's ODE
  • From: Mark McClure <mcmcclur at unca.edu>
  • Date: Thu, 12 Nov 2009 06:06:45 -0500 (EST)
  • References: <200911110929.EAA29439@smc.vnet.net>

On Wed, Nov 11, 2009 at 4:29 AM, Virgil Stokes <vs at it.uu.se> wrote:
> I can not see why the following does not work as expected,
>
> s = NDSolve[{t * (y[t])^2 * (y'[t])^3 - (y[t])^3 *  (y'[t])^2 +  t *
> (t^2 + 1) * y'[t] - t^2 *y[t] == 0, y[1] == Sqrt[3/2]},   y[t], {t, 1, 10}]
>
> Note, the solution to this nonlinear, non-autonomous, implicit ODE for
> initial condition y[1] = Sqrt[3/2] is just y[t] = Sqrt[t^2 + 1].


First, I think the correct solution is y(t) = sqrt(t^2 + 1/2).
In[1]:= y[t_] = Sqrt[t^2 + 1/2];
t*(y[t])^2*(y'[t])^3 - (y[t])^3*(y'[t])^2 +
   t*(t^2 + 1)*y'[t] - t^2*y[t] // Simplify // InputForm
Out[2]//InputForm=
0

Second, I see no problem with Mathematica's numerical solution.
In[3]:= Clear[y];
s = NDSolve[{
    t*(y[t])^2*(y'[t])^3 - (y[t])^3*(y'[t])^2 +
      t*(t^2 + 1)*y'[t] - t^2*y[t] == 0,
    y[1] == Sqrt[3/2]}, y[t], {t, 1, 10}];
y[t_] = y[t] /. s[[1]];
NIntegrate[(y[t] - Sqrt[t^2 + 1/2])^2, {t, 1, 10}]
Out[6]= 1.43523*10^-13

One bit of strangeness: NDSolve returns a list of three
solutions.  Does this violate any particular existence
and uniqueness theorem?  Perhaps not, as two solutions
are complex.

Mark McClure


  • Prev by Date: Solving ODE for rotational, irrotational vector field
  • Next by Date: Re: Cumulative probability that random walk variable exceeds
  • Previous by thread: Solving Weissinger's ODE
  • Next by thread: Re: Solving Weissinger's ODE