89.1.30 problem 30

Internal problem ID [24265]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Exercises at page 21
Problem number : 30
Date solved : Thursday, October 02, 2025 at 10:02:31 PM
CAS classification : [_quadrature]

\begin{align*} v v^{\prime }&=g \end{align*}

With initial conditions

\begin{align*} v \left (x_{0} \right )&=v_{0} \\ \end{align*}
Maple
ode:=v(x)*diff(v(x),x) = g; 
ic:=[v(x__0) = v__0]; 
dsolve([ode,op(ic)],v(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica. Time used: 0.073 (sec). Leaf size: 43
ode=v[x]*D[v[x],x]==g; 
ic={v[x0]==v0}; 
DSolve[{ode,ic},v[x],x,IncludeSingularSolutions->True]
 
\begin{align*} v(x)&\to -\sqrt {2 g (x-\text {x0})+\text {v0}^2}\\ v(x)&\to \sqrt {2 g (x-\text {x0})+\text {v0}^2} \end{align*}
Sympy. Time used: 0.264 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
g = symbols("g") 
x0 = symbols("x0") 
v0 = symbols("v0") 
v = Function("v") 
ode = Eq(-g + v(x)*Derivative(v(x), x),0) 
ics = {v(x0): v0} 
dsolve(ode,func=v(x),ics=ics)
 
\[ v{\left (x \right )} = \sqrt {2 g x - 2 g x_{0} + v_{0}^{2}} \]