48.1.6 problem Example 3.6

Internal problem ID [7507]
Book : THEORY OF DIFFERENTIAL EQUATIONS IN ENGINEERING AND MECHANICS. K.T. CHAU, CRC Press. Boca Raton, FL. 2018
Section : Chapter 3. Ordinary Differential Equations. Section 3.2 FIRST ORDER ODE. Page 114
Problem number : Example 3.6
Date solved : Sunday, March 30, 2025 at 12:11:27 PM
CAS classification : [_exact]

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

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