12.19.35 problem section 9.3, problem 35

Internal problem ID [2182]
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 35
Date solved : Tuesday, March 04, 2025 at 01:51:15 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }-7 y^{\prime \prime }+20 y^{\prime }-24 y&=-{\mathrm e}^{2 x} \left (\left (13-8 x \right ) \cos \left (2 x \right )-\left (8-4 x \right ) \sin \left (2 x \right )\right ) \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 48
ode:=diff(diff(diff(y(x),x),x),x)-7*diff(diff(y(x),x),x)+20*diff(y(x),x)-24*y(x) = -exp(2*x)*((13-8*x)*cos(2*x)-(8-4*x)*sin(2*x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\left (-20 x^{2}+40 c_2 +60 x -83\right ) \cos \left (2 x \right )+20 \left (x +2 c_3 -\frac {47}{10}\right ) \sin \left (2 x \right )\right ) {\mathrm e}^{2 x}}{40}+c_1 \,{\mathrm e}^{3 x} \]
Mathematica. Time used: 0.839 (sec). Leaf size: 55
ode=1*D[y[x],{x,3}]-7*D[y[x],{x,2}]+20*D[y[x],x]-24*y[x]==-Exp[2*x]*((13-8*x)*Cos[2*x]-(8-4*x)*Sin[2*x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{40} e^{2 x} \left (\left (-20 x^2+60 x+21+40 c_2\right ) \cos (2 x)+40 c_3 e^x+(20 x-37+40 c_1) \sin (2 x)\right ) \]
Sympy. Time used: 0.843 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(((13 - 8*x)*cos(2*x) + (4*x - 8)*sin(2*x))*exp(2*x) - 24*y(x) + 20*Derivative(y(x), x) - 7*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_{3} e^{x} + \left (C_{1} + \frac {x}{2}\right ) \sin {\left (2 x \right )} + \left (C_{2} - \frac {x^{2}}{2} + \frac {3 x}{2}\right ) \cos {\left (2 x \right )}\right ) e^{2 x} \]