       Re: Solving Weissinger's ODE

• To: mathgroup at smc.vnet.net
• Subject: [mg104896] Re: Solving Weissinger's ODE
• From: Valeri Astanoff <astanoff at gmail.com>
• Date: Fri, 13 Nov 2009 05:50:39 -0500 (EST)
• References: <hde08e\$spq\$1@smc.vnet.net>

```On 11 nov, 10:30, Virgil Stokes <v... 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 == Sqrt[3/2]},   y[t],=
{t, 1, 10}]
>
> Note, the solution to this nonlinear, non-autonomous, implicit ODE for
> initial condition y = Sqrt[3/2] is just y[t] = Sqrt[t^2 + 1].
>
> Any suggestions on how to obtain the solution (either analytic or
> numerical) would be appreciated.
>
> --V. Stokes

Good day,

Here is one way to get around the trouble :

In:= lhs=t*(y[t])^2*(y'[t])^3-(y[t])^3*(y'[t])^2+t*(t^2+1)*y'[t]-
t^2*y[t];

In:= Solve[ (lhs/.t->1/.y->Sqrt[3/2])==0,y']
Out= {{Derivative[y] -> Sqrt[2/3]},
{Derivative[y] -> (1/12)*(Sqrt - I*Sqrt)},
{Derivative[y] -> (1/12)*(Sqrt + I*Sqrt)}}

In:= dlhs=D[lhs,t];

In:= f[t_] = y[t] /. NDSolve[{dlhs == 0,
y == Sqrt[3/2], y' == Sqrt[2/3]}, y[t], {t, 1, 10}]//First
Out= InterpolatingFunction[{{1.,10.}},<>][t]

In:= Plot[f[t],{t,1,10}]
[...]

Check :

In:= f-Sqrt[3/2]
Out= 0.

In:= f'-Sqrt[2/3]
Out= 0.

In:= lhs/.y->f/.t->2
Out= 1.5067638958754515*^-7

In:= lhs/.y->f/.t->5
Out= 3.0166387716690224*^-6

In:= lhs/.y->f/.t->10
Out= 0.00002105357486925641

hth

--
Valeri Astanoff

```

• Prev by Date: Re: Non-Linear pendulum
• Next by Date: Re: Set::setps error? Twitter.m's OOP-like approach?
• Previous by thread: Re: Solving Weissinger's ODE
• Next by thread: Line Wrapping Problems, Slow Delete All Output