20.7.8 problem Problem 32

Internal problem ID [3723]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.3, The Method of Undetermined Coefficients. page 525
Problem number : Problem 32
Date solved : Sunday, March 30, 2025 at 02:06:32 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.004 (sec). Leaf size: 33
ode:=diff(diff(diff(y(x),x),x),x)+3*diff(diff(y(x),x),x)+3*diff(y(x),x)+y(x) = 2*exp(-x)+3*exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left ({\mathrm e}^{3 x}+9 c_3 \,x^{2}+3 x^{3}+9 c_2 x +9 c_1 \right ) {\mathrm e}^{-x}}{9} \]
Mathematica. Time used: 0.105 (sec). Leaf size: 41
ode=D[y[x],{x,3}]+3*D[y[x],{x,2}]+3*D[y[x],x]+y[x]==2*Exp[-x]+3*Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{9} e^{-x} \left (3 x^3+9 c_3 x^2+e^{3 x}+9 c_2 x+9 c_1\right ) \]
Sympy. Time used: 0.321 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) - 3*exp(2*x) + 3*Derivative(y(x), x) + 3*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)) - 2*exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + x \left (C_{2} + x \left (C_{3} + \frac {x}{3}\right )\right )\right ) e^{- x} + \frac {e^{2 x}}{9} \]