73.9.32 problem 14.5 (b)

Internal problem ID [15214]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 14. Higher order equations and the reduction of order method. Additional exercises page 277
Problem number : 14.5 (b)
Date solved : Thursday, March 13, 2025 at 05:49:35 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }-9 y^{\prime \prime }+27 y^{\prime }-27 y&={\mathrm e}^{3 x} \sin \left (x \right ) \end{align*}

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