59.5.6 problem 10.3 (i)

Internal problem ID [15026]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 10, Two tricks for nonlinear equations. Exercises page 97
Problem number : 10.3 (i)
Date solved : Thursday, October 02, 2025 at 10:01:55 AM
CAS classification : [_separable]

\begin{align*} V^{\prime }\left (x \right )+2 y y^{\prime }&=0 \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 25
ode:=diff(V(x),x)+2*y(x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \sqrt {-V \left (x \right )+c_1} \\ y &= -\sqrt {-V \left (x \right )+c_1} \\ \end{align*}
Mathematica. Time used: 0.051 (sec). Leaf size: 37
ode=D[ V[x],x]+2*y[x]*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\sqrt {-V(x)+2 c_1}\\ y(x)&\to \sqrt {-V(x)+2 c_1} \end{align*}
Sympy. Time used: 0.252 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x)*Derivative(y(x), x) + Derivative(V(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {C_{1} - V{\left (x \right )}}, \ y{\left (x \right )} = \sqrt {C_{1} - V{\left (x \right )}}\right ] \]