6.19.52 problem section 9.3, problem 52

Internal problem ID [2199]
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 52
Date solved : Tuesday, September 30, 2025 at 05:24:55 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }+3 y^{\prime \prime }+3 y^{\prime }+y&=12 \,{\mathrm e}^{-x}+9 \cos \left (2 x \right )-13 \sin \left (2 x \right ) \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 35
ode:=diff(diff(diff(y(x),x),x),x)+3*diff(diff(y(x),x),x)+3*diff(y(x),x)+y(x) = 12*exp(-x)+9*cos(2*x)-13*sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_3 \,x^{2}+2 x^{3}+c_2 x +c_1 \right ) {\mathrm e}^{-x}-\cos \left (2 x \right )+\sin \left (2 x \right ) \]
Mathematica. Time used: 0.166 (sec). Leaf size: 46
ode=1*D[y[x],{x,3}]+3*D[y[x],{x,2}]+3*D[y[x],x]+1*y[x]==12*Exp[-x]+9*Cos[2*x]-13*Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-x} \left (2 x^3+c_3 x^2+e^x \sin (2 x)-e^x \cos (2 x)+c_2 x+c_1\right ) \end{align*}
Sympy. Time used: 0.295 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) + 13*sin(2*x) - 9*cos(2*x) + 3*Derivative(y(x), x) + 3*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)) - 12*exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + x \left (C_{2} + x \left (C_{3} + 2 x\right )\right )\right ) e^{- x} + \sin {\left (2 x \right )} - \cos {\left (2 x \right )} \]