7.7.36 problem 36

Internal problem ID [214]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Review problems at page 98
Problem number : 36
Date solved : Tuesday, March 04, 2025 at 11:04:44 AM
CAS classification : [_separable]

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

Maple. Time used: 0.001 (sec). Leaf size: 27
ode:=diff(y(x),x) = (y(x)^(1/2)-y(x))/tan(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.255 (sec). Leaf size: 35
ode=D[y[x],x] == (Sqrt[y[x]]-y[x])/Tan[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.592 (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 \]