8.6.36 problem 36 (a)

Internal problem ID [806]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Chapter 1 review problems. Page 78
Problem number : 36 (a)
Date solved : Tuesday, March 04, 2025 at 11:51:44 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\cot \left (x \right ) \left (\sqrt {y}-y\right ) \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 27
ode:=diff(y(x),x) = cot(x)*(y(x)^(1/2)-y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ \sqrt {y}-\frac {\int \frac {\cos \left (x \right )}{\sqrt {\sin \left (x \right )}}d x +2 c_1}{2 \sqrt {\sin \left (x \right )}} = 0 \]
Mathematica. Time used: 0.237 (sec). Leaf size: 35
ode=D[y[x],x] == Cot[x]*(y[x]^(1/2)-y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \csc (x) \left (\sqrt {\sin (x)}+e^{\frac {c_1}{2}}\right ){}^2 \\ y(x)\to 0 \\ y(x)\to 1 \\ \end{align*}
Sympy. Time used: 0.577 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-sqrt(y(x)) + y(x))/tan(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {2 e^{\frac {C_{1}}{2}}}{\sqrt {\sin {\left (x \right )}}} + \frac {e^{C_{1}}}{\sin {\left (x \right )}} + 1 \]