       Re: Problem with a 1st order IV ODE (nonlinear)

• To: mathgroup at smc.vnet.net
• Subject: [mg102579] Re: [mg102564] Problem with a 1st order IV ODE (nonlinear)
• From: danl at wolfram.com
• Date: Sat, 15 Aug 2009 05:33:40 -0400 (EDT)
• References: <200908140959.FAA01407@smc.vnet.net>

```> I am using Mathematica 7.0 on a Win2K platform and noticed that when I
> execute the following:
>
> R = 10;
> k = 0.01;
> sol = DSolve[{h'[t] == 1/(h[t] (2 R - h[t])) - k, h == 0}, h[t], t]
> // FullSimplify
>
> I get two possible solutions:
> {{h[t] -> -0.005 t - 0.005 Sqrt[t (4000. + t)]}, {h[t] -> -0.005 t +
> 0.005 Sqrt[t (4000. + t)]}}
>
> which, I believe are correct. However, if I try to get an analytical
> solution in terms of R and k,
>
> Clear[R, k]
> sol = DSolve[{h'[t] == 1/(h[t] (2 R - h[t])) - k, h == 0}, h[t],  t]
> // FullSimplify
>
> I get the following two output messages:
> Solve::tdep: The equations appear to involve the variables to be solved
> for in an essentially non-algebraic way.
> DSolve::bvnul: For some branches of the general solution, the given
> boundary conditions lead to an empty solution.
>
> Note, that R > 0, and  k >= 0..
> Is there anyway that I can get an analytical solution to this problem
> for these conditions?
>
> --V. Stokes

I tend to think not. Your special solution arises from the relation k=1/R^2.

To see this, one can do as follows.

In:= Unprotect[Solve];
Solve[args__] := Null /; (Print[solve[args]]; False)

Notice that I call the second variable r2 (not r^2), and explicitly invert
it in the input.

In:= sol =
DSolve[{h'[t] == 1/(h[t] (2*r - h[t])) - 1/r2, h == 0}, h[t], t]

During evaluation of In:= solve[-r2+2 r h[t]-h[t]^2+2 r r2 h[t]
(h^\[Prime])[t]-r2 h[t]^2 (h^\[Prime])[t]==0,(h^\[Prime])[t]]

During evaluation of In:= solve[-((r2
ArcTan[(-r+h[t])/Sqrt[-r^2+r2]])/Sqrt[-r^2+r2])+h[t]==-(t/r2)+C,h[t]]

During evaluation of In:= Solve::tdep: The equations appear to involve
the variables to be solved for in an essentially non-algebraic way. >>

During evaluation of In:= solve[{InverseFunction[-((r2
ArcTan[(-r+#1)/Sqrt[-r^2+r2]])/Sqrt[-r^2+r2])+#1&][C]==0},{C},VerifySolutions->True]

During evaluation of In:= solve[{InverseFunction[-((r2
ArcTan[(-r+#1)/Sqrt[-r^2+r2]])/Sqrt[-r^2+r2])+#1&][C]==0},{C},VerifySolutions->True]

During evaluation of In:= DSolve::bvnul: For some branches of the
general solution, the given boundary conditions lead to an empty solution.
>>

Out= {}

If you look at the second solve[...] printed, you see there is a
singularity when r2 is r^2, and thus something different might happen in
that case. We now try it explicitly.

In:= sol =
DSolve[{h'[t] == 1/(h[t] (2*r - h[t])) - 1/r^2, h == 0}, h[t], t]

During evaluation of In:= solve[-r^2+2 r h[t]-h[t]^2+2 r^3 h[t]
(h^\[Prime])[t]-r^2 h[t]^2 (h^\[Prime])[t]==0,(h^\[Prime])[t]]

During evaluation of In:= solve[h[t]+r^2/(-r+h[t])==-(t/r^2)+C,h[t]]

During evaluation of In:= solve[{(r^3+r^2 C+Sqrt[-r^4 (3 r^2+2 r
C-C^2)])/(2 r^2)==0},{C},VerifySolutions->True]

During evaluation of In:= solve[{(r^3+r^2 C-Sqrt[-r^4 (3 r^2+2 r
C-C^2)])/(2 r^2)==0},{C},VerifySolutions->True]

Out= {{h[t] -> (-t - Sqrt[t (4 r^3 + t)])/(
2 r^2)}, {h[t] -> (-t + Sqrt[t (4 r^3 + t)])/(2 r^2)}}

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: Re: ListLogLinearPlot with two y-axis
• Next by Date: Re: Bug: ListPlot and Tooltip
• Previous by thread: Re: Problem with a 1st order IV ODE (nonlinear)
• Next by thread: Re: Problem with a 1st order IV ODE (nonlinear)