88.8.4 problem 4

Internal problem ID [24012]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 2. Differential equations of first order. Exercise at page 44
Problem number : 4
Date solved : Thursday, October 02, 2025 at 09:54:04 PM
CAS classification : [_linear]

\begin{align*} 2 y \cos \left (x \right )-1+\sin \left (x \right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 15
ode:=2*cos(x)*y(x)-1+sin(x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-\cos \left (x \right )+c_1 \right ) \csc \left (x \right )^{2} \]
Mathematica. Time used: 0.024 (sec). Leaf size: 18
ode=( 2*y[x]*Cos[x]-1 )+( Sin[x] )*D[y[x],{x,1}]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \csc (x) (-\cot (x)+c_1 \csc (x)) \end{align*}
Sympy. Time used: 0.191 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x)*cos(x) + sin(x)*Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} - \cos {\left (x \right )}}{\sin ^{2}{\left (x \right )}} \]