29.15.4 problem 412

Internal problem ID [5010]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 15
Problem number : 412
Date solved : Sunday, March 30, 2025 at 04:30:47 AM
CAS classification : [_separable]

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

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