10.5.7 problem 7

Internal problem ID [1199]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.6. Page 100
Problem number : 7
Date solved : Saturday, March 29, 2025 at 10:45:56 PM
CAS classification : [_exact]

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

Maple. Time used: 0.021 (sec). Leaf size: 17
ode:=exp(x)*sin(y(x))-2*sin(x)*y(x)+(2*cos(x)+exp(x)*cos(y(x)))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ {\mathrm e}^{x} \sin \left (y\right )+2 \cos \left (x \right ) y+c_1 = 0 \]
Mathematica. Time used: 0.276 (sec). Leaf size: 20
ode=Exp[x]*Sin[y[x]]-2*Sin[x]*y[x]+(2*Cos[x]+Exp[x]*Cos[y[x]])*D[y[x],x] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [e^x \sin (y(x))+2 y(x) \cos (x)=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((exp(x)*cos(y(x)) + 2*cos(x))*Derivative(y(x), x) - 2*y(x)*sin(x) + exp(x)*sin(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out