71.11.5 problem 5

Internal problem ID [14435]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 4. N-th Order Linear Differential Equations. Exercises 4.4, page 218
Problem number : 5
Date solved : Saturday, February 22, 2025 at 03:48:30 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }-6 y^{\prime \prime }+21 y^{\prime }-26 y&=36 \,{\mathrm e}^{2 x} \sin \left (3 x \right ) \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 41
ode:=diff(diff(diff(y(x),x),x),x)-6*diff(diff(y(x),x),x)+21*diff(y(x),x)-26*y(x) = 36*exp(2*x)*sin(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{2 x} \left (3 c_{3} \sin \left (3 x \right )-6 x \sin \left (3 x \right )+3 c_{2} \cos \left (3 x \right )-2 \cos \left (3 x \right )+3 c_{1} \right )}{3} \]
Mathematica. Time used: 0.029 (sec). Leaf size: 82
ode=D[y[x],{x,3}]-6*D[y[x],{x,2}]+21*D[y[x],x]-26*y[x]==36*Exp[2*x]*Sin[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{2 x} \left (\sin (3 x) \int _1^x-4 \sin ^2(3 K[1])dK[1]+\int _1^x4 \sin (3 K[3])dK[3]+\cos (3 x) \int _1^x-2 \sin (6 K[2])dK[2]+c_2 \cos (3 x)+c_1 \sin (3 x)+c_3\right ) \]
Sympy. Time used: 0.359 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-26*y(x) - 36*exp(2*x)*sin(3*x) + 21*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 )} = \left (C_{1} + C_{3} \cos {\left (3 x \right )} + \left (C_{2} - 2 x\right ) \sin {\left (3 x \right )}\right ) e^{2 x} \]