71.1.127 problem 154 (page 236)

Internal problem ID [19303]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 154 (page 236)
Date solved : Thursday, October 02, 2025 at 04:18:35 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-6 y^{\prime }+8 y&={\mathrm e}^{x}+{\mathrm e}^{2 x} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 28
ode:=diff(diff(y(x),x),x)-6*diff(y(x),x)+8*y(x) = exp(x)+exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {\left (-{\mathrm e}^{2 x} c_1 +x -2 c_2 -\frac {2 \,{\mathrm e}^{-x}}{3}\right ) {\mathrm e}^{2 x}}{2} \]
Mathematica. Time used: 0.191 (sec). Leaf size: 45
ode=D[y[x],{x,2}]-6*D[y[x],x]+8*y[x]==Exp[x]+Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {1}{12} e^x \left (3 e^x+6 e^x \log \left (e^x\right )-4\right )+c_1 e^{2 x}+c_2 e^{4 x} \end{align*}
Sympy. Time used: 0.148 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(8*y(x) - exp(2*x) - exp(x) - 6*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{2} e^{3 x} + \left (C_{1} - \frac {x}{2}\right ) e^{x} + \frac {1}{3}\right ) e^{x} \]