75.4.18 problem 63

Internal problem ID [16649]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 4. Equations with variables separable and equations reducible to them. Exercises page 38
Problem number : 63
Date solved : Monday, March 31, 2025 at 03:03:33 PM
CAS classification : [_separable]

\begin{align*} a^{2}+y^{2}+2 x \sqrt {a x -x^{2}}\, y^{\prime }&=0 \end{align*}

With initial conditions

\begin{align*} y \left (a \right )&=0 \end{align*}

Maple. Time used: 0.159 (sec). Leaf size: 22
ode:=a^2+y(x)^2+2*x*(a*x-x^2)^(1/2)*diff(y(x),x) = 0; 
ic:=y(a) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \tan \left (\frac {a -x}{\sqrt {x \left (a -x \right )}}\right ) a \]
Mathematica. Time used: 9.439 (sec). Leaf size: 237
ode=(a^2+y[x]^2)+2*x*Sqrt[a*x-x^2]*D[y[x],x]==0; 
ic={y[a]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to a \tan \left (a \left (-\frac {\left (\sqrt {x}-1\right ) \left (\sqrt {a-x}-\sqrt {a-1}\right ) \sqrt {a-x} \left (-2 \left (\sqrt {a-1} \sqrt {a-x}+1\right )-a \left (\sqrt {x}-2\right )+\sqrt {x} \left (\sqrt {a-1} \sqrt {a-x}+2\right )-x\right )}{\sqrt {x (a-x)} \left (-2 a^2 \left (\sqrt {x}-2\right )+a \left (\sqrt {x} \left (2 \sqrt {a-1} \sqrt {a-x}+1\right )-4 \left (\sqrt {a-1} \sqrt {a-x}+1\right )+x^{3/2}-2 x\right )+2 \left (\sqrt {a-1} \sqrt {a-x}+\sqrt {x}\right )\right )}-\frac {i \sqrt {a-1}}{\sqrt {-a^2}}\right )\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(a**2 + 2*x*sqrt(a*x - x**2)*Derivative(y(x), x) + y(x)**2,0) 
ics = {y(a): 0} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Couldnt solve for initial conditions