89.6.25 problem 25

Internal problem ID [24408]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Miscellaneous Exercises at page 45
Problem number : 25
Date solved : Thursday, October 02, 2025 at 10:25:45 PM
CAS classification : [_separable]

\begin{align*} a^{2} \left (y^{\prime }-1\right )&=x^{2} y^{\prime }+y^{2} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 25
ode:=a^2*(diff(y(x),x)-1) = x^2*diff(y(x),x)+y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tan \left (c_1 a +\frac {\ln \left (a +x \right )}{2}-\frac {\ln \left (-a +x \right )}{2}\right ) a \]
Mathematica. Time used: 3.444 (sec). Leaf size: 37
ode=a^2*(D[y[x],x]-1)==x^2*D[y[x],x]+y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to a \tan \left (\text {arctanh}\left (\frac {x}{a}\right )+a c_1\right )\\ y(x)&\to -i a\\ y(x)&\to i a \end{align*}
Sympy. Time used: 48.637 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(a**2*(Derivative(y(x), x) - 1) - x**2*Derivative(y(x), x) - y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {a}{\tan {\left (C_{1} a - \frac {\log {\left (- a + x \right )}}{2} + \frac {\log {\left (a + x \right )}}{2} \right )}} \]