29.1.19 problem 18

Internal problem ID [4626]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 1
Problem number : 18
Date solved : Sunday, March 30, 2025 at 03:31:02 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 11
ode:=diff(y(x),x) = exp(x)*sin(x)+y(x)*cot(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left ({\mathrm e}^{x}+c_1 \right ) \sin \left (x \right ) \]
Mathematica. Time used: 0.079 (sec). Leaf size: 14
ode=D[y[x],x]==Exp[x]*Sin[x]+y[x]*Cot[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \left (e^x+c_1\right ) \sin (x) \]
Sympy. Time used: 0.958 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x)/tan(x) - exp(x)*sin(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + e^{x}\right ) \sin {\left (x \right )} \]