30.6.34 problem 35

Internal problem ID [7569]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Review problems. page 79
Problem number : 35
Date solved : Tuesday, September 30, 2025 at 04:53:16 PM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

\begin{align*} 2 y^{2}+4 x^{2}-x y y^{\prime }&=0 \end{align*}

With initial conditions

\begin{align*} y \left (1\right )&=-2 \\ \end{align*}
Maple. Time used: 0.028 (sec). Leaf size: 16
ode:=2*y(x)^2+4*x^2-x*y(x)*diff(y(x),x) = 0; 
ic:=[y(1) = -2]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -2 \sqrt {2 x^{2}-1}\, x \]
Mathematica. Time used: 0.33 (sec). Leaf size: 19
ode=(2*y[x]^2+4*x^2)-x*y[x]*D[y[x],x]==0; 
ic={y[1]==-2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -2 x \sqrt {2 x^2-1} \end{align*}
Sympy. Time used: 0.264 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*x**2 - x*y(x)*Derivative(y(x), x) + 2*y(x)**2,0) 
ics = {y(1): -2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - x \sqrt {8 x^{2} - 4} \]