##### 4.7.11 $$\left (a^2+x^2\right ) y'(x)=a^2-2 y(x)^2+3 x y(x)$$

ODE
$\left (a^2+x^2\right ) y'(x)=a^2-2 y(x)^2+3 x y(x)$ ODE Classiﬁcation

[_rational, _Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 0.477292 (sec), leaf count = 58

$\left \{\left \{y(x)\to \frac {a^2 c_1 (-x) \sqrt {a^2+x^2}+a^2+2 x^2}{2 x-a^2 c_1 \sqrt {a^2+x^2}}\right \}\right \}$

Maple
cpu = 0.419 (sec), leaf count = 280

$\left [y \left (x \right ) = -\frac {\left (-\frac {\left (i x -a \right ) \textit {\_C1} \sqrt {2}\, \sqrt {\frac {i x -a}{a}}\, \HeunC \left (0, -\frac {1}{2}, 2, 0, \frac {5}{4}, \frac {i x +a}{i x -a}\right )}{2}+\left (i x -a \right ) \sqrt {\frac {i x +a}{a}}\, \HeunC \left (0, \frac {1}{2}, 2, 0, \frac {5}{4}, \frac {i x +a}{i x -a}\right )+\left (i x +a \right ) \left (-\textit {\_C1} \sqrt {2}\, \sqrt {\frac {i x -a}{a}}\, \HeunCPrime \left (0, -\frac {1}{2}, 2, 0, \frac {5}{4}, \frac {i x +a}{i x -a}\right )+\HeunCPrime \left (0, \frac {1}{2}, 2, 0, \frac {5}{4}, \frac {i x +a}{i x -a}\right ) \sqrt {\frac {i x +a}{a}}\right )\right ) a}{\left (\textit {\_C1} \sqrt {2}\, \sqrt {\frac {i x -a}{a}}\, \HeunC \left (0, -\frac {1}{2}, 2, 0, \frac {5}{4}, \frac {i x +a}{i x -a}\right )-\sqrt {\frac {i x +a}{a}}\, \HeunC \left (0, \frac {1}{2}, 2, 0, \frac {5}{4}, \frac {i x +a}{i x -a}\right )\right ) \left (i a +x \right )}\right ]$ Mathematica raw input

DSolve[(a^2 + x^2)*y'[x] == a^2 + 3*x*y[x] - 2*y[x]^2,y[x],x]

Mathematica raw output

{{y[x] -> (a^2 + 2*x^2 - a^2*x*Sqrt[a^2 + x^2]*C[1])/(2*x - a^2*Sqrt[a^2 + x^2]*
C[1])}}

Maple raw input

dsolve((a^2+x^2)*diff(y(x),x) = a^2+3*x*y(x)-2*y(x)^2, y(x))

Maple raw output

[y(x) = -(-1/2*(I*x-a)*_C1*2^(1/2)*((I*x-a)/a)^(1/2)*HeunC(0,-1/2,2,0,5/4,(a+I*x
)/(I*x-a))+(I*x-a)*((a+I*x)/a)^(1/2)*HeunC(0,1/2,2,0,5/4,(a+I*x)/(I*x-a))+(a+I*x
)*(-_C1*2^(1/2)*((I*x-a)/a)^(1/2)*HeunCPrime(0,-1/2,2,0,5/4,(a+I*x)/(I*x-a))+Heu
nCPrime(0,1/2,2,0,5/4,(a+I*x)/(I*x-a))*((a+I*x)/a)^(1/2)))*a/(_C1*2^(1/2)*((I*x-
a)/a)^(1/2)*HeunC(0,-1/2,2,0,5/4,(a+I*x)/(I*x-a))-((a+I*x)/a)^(1/2)*HeunC(0,1/2,
2,0,5/4,(a+I*x)/(I*x-a)))/(I*a+x)]