87.1.19 problem 24

Internal problem ID [23231]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 1. Elementary methods. First order differential equations. Exercise at page 9
Problem number : 24
Date solved : Thursday, October 02, 2025 at 09:24:39 PM
CAS classification : [_rational, _Bernoulli]

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