81.3.16 problem 16

Internal problem ID [18563]
Book : A short course on differential equations. By Donald Francis Campbell. Maxmillan company. London. 1907
Section : Chapter III. Ordinary differential equations of the first order and first degree. Exercises at page 33
Problem number : 16
Date solved : Monday, March 31, 2025 at 05:42:50 PM
CAS classification : [_separable]

\begin{align*} \sqrt {2 a y-y^{2}}\, \csc \left (x \right )+y \tan \left (x \right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 47
ode:=(2*a*y(x)-y(x)^2)^(1/2)*csc(x)+y(x)*tan(x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ -\csc \left (x \right )-\sqrt {y \left (2 a -y\right )}+a \arctan \left (\frac {y-a}{\sqrt {y \left (2 a -y\right )}}\right )+c_1 = 0 \]
Mathematica. Time used: 1.656 (sec). Leaf size: 230
ode=Sqrt[2*a*y[x]-y[x]^2]*Csc[x]+y[x]*Tan[x]*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [\frac {\sqrt {\text {$\#$1}} \sqrt {\text {$\#$1}-2 a} \left (-\frac {2 \left (\sqrt {\text {$\#$1}}-1\right ) \left (\sqrt {1-2 a}-\sqrt {\text {$\#$1}-2 a}\right ) \left (a \left (\sqrt {1-2 a} \sqrt {\text {$\#$1}-2 a}-\text {$\#$1}-\sqrt {\text {$\#$1}}-1\right )-\sqrt {\text {$\#$1}} \sqrt {1-2 a} \sqrt {\text {$\#$1}-2 a}+\text {$\#$1}+2 a^2\right )}{\left (\sqrt {1-2 a} \sqrt {\text {$\#$1}-2 a}-\sqrt {\text {$\#$1}}+2 a\right )^2}-4 a \text {arctanh}\left (\frac {\sqrt {\text {$\#$1}}-1}{\sqrt {1-2 a}-\sqrt {\text {$\#$1}-2 a}}\right )\right )}{\sqrt {-\text {$\#$1} (\text {$\#$1}-2 a)}}\&\right ][\csc (x)+c_1] \\ y(x)\to 0 \\ y(x)\to 2 a \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(sqrt(2*a*y(x) - y(x)**2)/sin(x) + y(x)*tan(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out