73.7.21 problem 21

Internal problem ID [15100]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 8. Review exercises for part of part II. page 143
Problem number : 21
Date solved : Thursday, March 13, 2025 at 05:38:03 AM
CAS classification : [_quadrature]

\begin{align*} \sin \left (x \right )+2 \cos \left (x \right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 11
ode:=sin(x)+2*cos(x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\ln \left (\cos \left (x \right )\right )}{2}+c_{1} \]
Mathematica. Time used: 0.004 (sec). Leaf size: 15
ode=Sin[x]+2*Cos[x]*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} \log (\cos (x))+c_1 \]
Sympy. Time used: 0.170 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(sin(x) + 2*cos(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + \frac {\log {\left (\cos {\left (x \right )} \right )}}{2} \]