6.19.59 problem section 9.3, problem 59

Internal problem ID [2206]
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 59
Date solved : Tuesday, September 30, 2025 at 05:25:00 AM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime \prime }-4 y^{\prime \prime \prime }+7 y^{\prime \prime }-6 y^{\prime }+2 y&={\mathrm e}^{x} \left (12 x -2 \cos \left (x \right )+2 \sin \left (x \right )\right ) \end{align*}
Maple. Time used: 0.010 (sec). Leaf size: 33
ode:=diff(diff(diff(diff(y(x),x),x),x),x)-4*diff(diff(diff(y(x),x),x),x)+7*diff(diff(y(x),x),x)-6*diff(y(x),x)+2*y(x) = exp(x)*(12*x-2*cos(x)+2*sin(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} \left (\cos \left (x \right ) \left (x +c_3 +3\right )+\sin \left (x \right ) \left (c_4 +x -2\right )+2 x^{3}+\left (c_2 -12\right ) x +c_1 \right ) \]
Mathematica. Time used: 0.083 (sec). Leaf size: 40
ode=D[y[x],{x,4}]-4*D[y[x],{x,3}]+7*D[y[x],{x,2}]-6*D[y[x],x]+2*y[x]==Exp[x]*(12*x-2*Cos[x]+2*Sin[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^x \left (2 x^3-12 x+c_4 x+(x+3+c_2) \cos (x)+(x-2+c_1) \sin (x)+c_3\right ) \end{align*}
Sympy. Time used: 0.352 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-12*x - 2*sin(x) + 2*cos(x))*exp(x) + 2*y(x) - 6*Derivative(y(x), x) + 7*Derivative(y(x), (x, 2)) - 4*Derivative(y(x), (x, 3)) + Derivative(y(x), (x, 4)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + C_{3} \sin {\left (x \right )} + C_{4} \cos {\left (x \right )} + x \left (C_{2} + 2 x^{2} + \sqrt {2} \sin {\left (x + \frac {\pi }{4} \right )}\right )\right ) e^{x} \]