69.20.10 problem 645

Internal problem ID [18431]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.5 Linear equations with variable coefficients. The Lagrange method. Exercises page 148
Problem number : 645
Date solved : Thursday, October 02, 2025 at 03:11:50 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y^{\prime }+y \,{\mathrm e}^{-2 x}&={\mathrm e}^{-3 x} \end{align*}

Using reduction of order method given that one solution is

\begin{align*} y&=\cos \left ({\mathrm e}^{-x}\right ) \end{align*}
Maple. Time used: 0.008 (sec). Leaf size: 28
ode:=diff(diff(y(x),x),x)+diff(y(x),x)+exp(-2*x)*y(x) = exp(-3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left ({\mathrm e}^{-x}\right ) c_2 +\cos \left ({\mathrm e}^{-x}\right ) c_1 +\sin \left ({\mathrm e}^{-x}\right )+{\mathrm e}^{-x} \]
Mathematica. Time used: 0.059 (sec). Leaf size: 82
ode=D[y[x],{x,2}]+D[y[x],x]+Exp[-2*x]*y[x]==Exp[-3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \cos \left (e^{-x}\right ) \int _1^xe^{-2 K[1]} \sin \left (e^{-K[1]}\right )dK[1]-\sin \left (e^{-x}\right ) \int _1^xe^{-2 K[2]} \cos \left (e^{-K[2]}\right )dK[2]+c_1 \cos \left (e^{-x}\right )-c_2 \sin \left (e^{-x}\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)*exp(-2*x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)) - exp(-3*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : solve: Cannot solve y(x)*exp(-2*x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)) - exp(-3*x)