19.2.11 problem 11

Internal problem ID [3540]
Book : Differential equations and linear algebra, Stephen W. Goode, second edition, 2000
Section : 1.6, page 50
Problem number : 11
Date solved : Sunday, March 30, 2025 at 01:46:43 AM
CAS classification : [_linear]

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

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