28.1.53 problem 54

Internal problem ID [4359]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 54
Date solved : Tuesday, March 04, 2025 at 06:33:00 PM
CAS classification : [_linear]

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

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