20.9.22 problem Problem 22

Internal problem ID [3766]
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.7, The Variation of Parameters Method. page 556
Problem number : Problem 22
Date solved : Tuesday, March 04, 2025 at 05:15:02 PM
CAS classification : [[_3rd_order, _missing_y]]

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

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