86.4.3 problem 3

Internal problem ID [23110]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 4. Linear equations of the first order. Exercise 4b at page 64
Problem number : 3
Date solved : Thursday, October 02, 2025 at 09:22:55 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }&=\frac {y x +a^{2}}{a^{2}-x^{2}} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 37
ode:=diff(y(x),x) = (x*y(x)+a^2)/(a^2-x^2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-a^{2} \ln \left (x +\sqrt {-a^{2}+x^{2}}\right )+c_1}{\sqrt {-a^{2}+x^{2}}} \]
Mathematica. Time used: 0.024 (sec). Leaf size: 42
ode=D[y[x],x]==(x*y[x]+a^2)/(a^2-x^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {a^2 \arctan \left (\frac {x}{\sqrt {a^2-x^2}}\right )+c_1}{\sqrt {a^2-x^2}} \end{align*}
Sympy. Time used: 0.600 (sec). Leaf size: 97
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (a**2 + x*y(x))/(a**2 - x**2),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \begin {cases} \frac {C_{1}}{\sqrt {- a^{2} + x^{2}}} - \frac {a^{2} \log {\left (x + \sqrt {- a^{2} + x^{2}} \right )}}{\sqrt {- a^{2} + x^{2}}} - \frac {a^{2} \log {\left (2 \right )}}{\sqrt {- a^{2} + x^{2}}} & \text {for}\: a > 0 \vee a < 0 \\\frac {C_{1}}{\sqrt {- a^{2} + x^{2}}} - \frac {a^{2} x \log {\left (x \right )}}{\sqrt {- a^{2} + x^{2}} \sqrt {x^{2}}} & \text {otherwise} \end {cases} \]