29.1.12 problem 11

Internal problem ID [4619]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 1
Problem number : 11
Date solved : Tuesday, March 04, 2025 at 06:56:50 PM
CAS classification : [_linear]

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

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