38.1.20 problem 22

Internal problem ID [8181]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 1. Introduction to differential equations. Exercises 1.1 at page 12
Problem number : 22
Date solved : Tuesday, September 30, 2025 at 05:18:20 PM
CAS classification : [[_homogeneous, `class G`], _exact, _rational, [_Abel, `2nd type`, `class A`]]

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