78.15.18 problem 20

Internal problem ID [18303]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 3. Second order linear equations. Section 22. Higher Order Linear Equations. Coupled Harmonic Oscillators. Problems at page 160
Problem number : 20
Date solved : Monday, March 31, 2025 at 05:25:10 PM
CAS classification : [[_3rd_order, _missing_y]]

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

Maple. Time used: 0.002 (sec). Leaf size: 26
ode:=diff(diff(diff(y(x),x),x),x)-3*diff(diff(y(x),x),x)+2*diff(y(x),x) = 10+42*exp(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} c_2 +\frac {{\mathrm e}^{2 x} c_1}{2}+7 \,{\mathrm e}^{3 x}+5 x +c_3 \]
Mathematica. Time used: 0.267 (sec). Leaf size: 35
ode=D[y[x],{x,3}]-3*D[y[x],{x,2}]+2*D[y[x],x]==10+42*Exp[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 5 x+7 e^{3 x}+c_1 e^x+\frac {1}{2} c_2 e^{2 x}+c_3 \]
Sympy. Time used: 0.197 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-42*exp(3*x) + 2*Derivative(y(x), x) - 3*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)) - 10,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} e^{x} + C_{3} e^{2 x} + 5 x + 7 e^{3 x} \]