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] == 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] == 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[46]:= 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[48]:= sol = DSolve[{h'[t] == 1/(h[t] (2*r - h[t])) - 1/r2, h[0] == 0}, h[t], t] During evaluation of In[48]:= 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[48]:= solve[-((r2 ArcTan[(-r+h[t])/Sqrt[-r^2+r2]])/Sqrt[-r^2+r2])+h[t]==-(t/r2)+C[1],h[t]] During evaluation of In[48]:= Solve::tdep: The equations appear to involve the variables to be solved for in an essentially non-algebraic way. >> During evaluation of In[48]:= solve[{InverseFunction[-((r2 ArcTan[(-r+#1)/Sqrt[-r^2+r2]])/Sqrt[-r^2+r2])+#1&][C[1]]==0},{C[1]},VerifySolutions->True] During evaluation of In[48]:= solve[{InverseFunction[-((r2 ArcTan[(-r+#1)/Sqrt[-r^2+r2]])/Sqrt[-r^2+r2])+#1&][C[1]]==0},{C[1]},VerifySolutions->True] During evaluation of In[48]:= DSolve::bvnul: For some branches of the general solution, the given boundary conditions lead to an empty solution. >> Out[48]= {} 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[50]:= sol = DSolve[{h'[t] == 1/(h[t] (2*r - h[t])) - 1/r^2, h[0] == 0}, h[t], t] During evaluation of In[50]:= 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[50]:= solve[h[t]+r^2/(-r+h[t])==-(t/r^2)+C[1],h[t]] During evaluation of In[50]:= solve[{(r^3+r^2 C[1]+Sqrt[-r^4 (3 r^2+2 r C[1]-C[1]^2)])/(2 r^2)==0},{C[1]},VerifySolutions->True] During evaluation of In[50]:= solve[{(r^3+r^2 C[1]-Sqrt[-r^4 (3 r^2+2 r C[1]-C[1]^2)])/(2 r^2)==0},{C[1]},VerifySolutions->True] Out[50]= {{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

**References**:**Problem with a 1st order IV ODE (nonlinear)***From:*Virgil Stokes <vs@it.uu.se>