69.17.23 problem 573

Internal problem ID [18359]
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.3 Nonhomogeneous linear equations with constant coefficients. Superposition principle. Exercises page 137
Problem number : 573
Date solved : Thursday, October 02, 2025 at 03:10:52 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+3 y^{\prime }+2 y&=6 x \,{\mathrm e}^{-x} \left (1-{\mathrm e}^{-x}\right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 36
ode:=diff(diff(y(x),x),x)+3*diff(y(x),x)+2*y(x) = 6*x*exp(-x)*(1-exp(-x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = 3 \left (\left (x^{2}+2 x -\frac {1}{3} c_1 +2\right ) {\mathrm e}^{-x}+x^{2}-2 x +\frac {c_2}{3}\right ) {\mathrm e}^{-x} \]
Mathematica. Time used: 0.199 (sec). Leaf size: 62
ode=D[y[x],{x,2}]+3*D[y[x],x]+2*y[x]==6*x*Exp[-x]*(1-Exp[-x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-2 x} \left (\int _1^x-6 \left (-1+e^{K[1]}\right ) K[1]dK[1]+e^x \int _1^x6 \left (1-e^{-K[2]}\right ) K[2]dK[2]+c_2 e^x+c_1\right ) \end{align*}
Sympy. Time used: 0.227 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-6*x*(1 - exp(-x))*exp(-x) + 2*y(x) + 3*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + 3 x^{2} - 6 x + \left (C_{2} + 3 x^{2} + 6 x\right ) e^{- x}\right ) e^{- x} \]