34.10.4 problem 13

Internal problem ID [8013]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 15. Linear equations with constant coefficients (Variation of parameters). Supplemetary problems. Page 98
Problem number : 13
Date solved : Tuesday, September 30, 2025 at 05:14:14 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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