12.19.36 problem section 9.3, problem 36

Internal problem ID [2183]
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 36
Date solved : Tuesday, March 04, 2025 at 01:51:17 PM
CAS classification : [[_3rd_order, _missing_y]]

\begin{align*} y^{\prime \prime \prime }-6 y^{\prime \prime }+18 y^{\prime }&=-{\mathrm e}^{3 x} \left (\left (2-3 x \right ) \cos \left (3 x \right )-\left (3+3 x \right ) \sin \left (3 x \right )\right ) \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 46
ode:=diff(diff(diff(y(x),x),x),x)-6*diff(diff(y(x),x),x)+18*diff(y(x),x) = -exp(3*x)*((2-3*x)*cos(3*x)-(3+3*x)*sin(3*x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\left (-3 x^{2}+6 c_1 -6 c_2 -1\right ) \cos \left (3 x \right )-3 \left (x -2 c_1 -2 c_2 +\frac {1}{9}\right ) \sin \left (3 x \right )\right ) {\mathrm e}^{3 x}}{36}+c_3 \]
Mathematica. Time used: 1.526 (sec). Leaf size: 57
ode=1*D[y[x],{x,3}]-6*D[y[x],{x,2}]+18*D[y[x],x]-0*y[x]==-Exp[3*x]*((2-3*x)*Cos[3*x]-(3+3*x)*Sin[3*x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_3-\frac {1}{216} e^{3 x} \left (6 \left (3 x^2+1+6 c_1-6 c_2\right ) \cos (3 x)+(18 x+1-36 c_1-36 c_2) \sin (3 x)\right ) \]
Sympy. Time used: 0.894 (sec). Leaf size: 102
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(((2 - 3*x)*cos(3*x) - (3*x + 3)*sin(3*x))*exp(3*x) + 18*Derivative(y(x), x) - 6*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + \left (- \frac {\sqrt {2} x^{2} \sin {\left (3 x + \frac {\pi }{4} \right )}}{24} - \frac {\sqrt {2} x^{2} \cos {\left (3 x + \frac {\pi }{4} \right )}}{24} + \frac {\sqrt {2} x \sin {\left (3 x + \frac {\pi }{4} \right )}}{24} - \frac {\sqrt {2} x \cos {\left (3 x + \frac {\pi }{4} \right )}}{72} + \left (C_{2} - \frac {5 x}{36}\right ) \sin {\left (3 x \right )} + \left (C_{3} - \frac {x}{36}\right ) \cos {\left (3 x \right )}\right ) e^{3 x} \]