81.14.19 problem 18-32

Internal problem ID [21704]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 18. Algebra of differential operators. Page 435
Problem number : 18-32
Date solved : Thursday, October 02, 2025 at 08:00:10 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-6 y^{\prime }+9 y&={\mathrm e}^{2 x} \left (1+x \right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 20
ode:=diff(diff(y(x),x),x)-6*diff(y(x),x)+9*y(x) = exp(2*x)*(1+x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{2 x} \left (\left (c_1 x +c_2 \right ) {\mathrm e}^{x}+x +3\right ) \]
Mathematica. Time used: 0.013 (sec). Leaf size: 27
ode=D[y[x],{x,2}]-6*D[y[x],x]+9*y[x]==Exp[2*x]*(x+1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{2 x} \left (x+c_2 e^x x+c_1 e^x+3\right ) \end{align*}
Sympy. Time used: 0.155 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x - 1)*exp(2*x) + 9*y(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 (x + \left (C_{1} + C_{2} x\right ) e^{x} + 3\right ) e^{2 x} \]