6.19.33 problem section 9.3, problem 33

Internal problem ID [2180]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 9 Introduction to Linear Higher Order Equations. Section 9.3. Undetermined Coefficients for Higher Order Equations. Page 495
Problem number : section 9.3, problem 33
Date solved : Tuesday, September 30, 2025 at 05:24:39 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }+3 y^{\prime \prime }+4 y^{\prime }+12 y&=8 \cos \left (2 x \right )-16 \sin \left (2 x \right ) \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 39
ode:=diff(diff(diff(y(x),x),x),x)+3*diff(diff(y(x),x),x)+4*diff(y(x),x)+12*y(x) = 8*cos(2*x)-16*sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (338 c_1 +208 x +99\right ) \cos \left (2 x \right )}{338}+\frac {\left (-84+182 x +169 c_3 \right ) \sin \left (2 x \right )}{169}+c_2 \,{\mathrm e}^{-3 x} \]
Mathematica. Time used: 0.115 (sec). Leaf size: 47
ode=1*D[y[x],{x,3}]+3*D[y[x],{x,2}]+4*D[y[x],x]+12*y[x]==8*Cos[2*x]-16*Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{169} \left (169 c_3 e^{-3 x}+(104 x+43+169 c_1) \cos (2 x)+(182 x-32+169 c_2) \sin (2 x)\right ) \end{align*}
Sympy. Time used: 0.217 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(12*y(x) + 16*sin(2*x) - 8*cos(2*x) + 4*Derivative(y(x), x) + 3*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{3} e^{- 3 x} + \left (C_{1} + \frac {8 x}{13}\right ) \cos {\left (2 x \right )} + \left (C_{2} + \frac {14 x}{13}\right ) \sin {\left (2 x \right )} \]