65.5.6 problem 10.3 (i)

Internal problem ID [13674]
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 : Monday, March 31, 2025 at 08:08:01 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.079 (sec). Leaf size: 68
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 {2} \sqrt {\int _1^x-\frac {1}{2} V''(K[1])dK[1]+c_1} \\ y(x)\to \sqrt {2} \sqrt {\int _1^x-\frac {1}{2} V''(K[1])dK[1]+c_1} \\ \end{align*}
Sympy. Time used: 0.388 (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 ] \]