22.2.61 problem 61

Internal problem ID [4504]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 4. Linear Differential Equations. Page 183
Problem number : 61
Date solved : Tuesday, September 30, 2025 at 07:33:20 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-y&={\mathrm e}^{-2 x} \sin \left ({\mathrm e}^{-x}\right ) \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 33
ode:=diff(diff(y(x),x),x)-y(x) = exp(-2*x)*sin(exp(-x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -{\mathrm e}^{x} \cos \left ({\mathrm e}^{-x}\right )-\sin \left ({\mathrm e}^{-x}\right )+{\mathrm e}^{-x} c_1 +\left (c_2 -1\right ) {\mathrm e}^{x} \]
Mathematica. Time used: 0.059 (sec). Leaf size: 39
ode=D[y[x],{x,2}]-y[x]==Exp[-2*x]*Sin[Exp[-x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\sin \left (e^{-x}\right )-e^x \cos \left (e^{-x}\right )+c_1 e^x+c_2 e^{-x} \end{align*}
Sympy. Time used: 2.728 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) + Derivative(y(x), (x, 2)) - exp(-2*x)*sin(exp(-x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{- x} + \left (C_{1} - \cos {\left (e^{- x} \right )}\right ) e^{x} - \sin {\left (e^{- x} \right )} \]