64.11.47 problem 47

Internal problem ID [13418]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number : 47
Date solved : Wednesday, March 05, 2025 at 09:56:41 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }-6 y^{\prime \prime }+12 y^{\prime }-8 y&=x \,{\mathrm e}^{2 x}+x^{2} {\mathrm e}^{3 x} \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 41
ode:=diff(diff(diff(y(x),x),x),x)-6*diff(diff(y(x),x),x)+12*diff(y(x),x)-8*y(x) = exp(2*x)*x+x^2*exp(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (x^{4}+24 c_{3} x^{2}+24 c_{2} x +24 c_{1} \right ) {\mathrm e}^{2 x}}{24}+{\mathrm e}^{3 x} \left (x^{2}-6 x +12\right ) \]
Mathematica. Time used: 0.149 (sec). Leaf size: 98
ode=D[y[x],{x,3}]-6*D[y[x],{x,2}]+12*D[y[x],x]-8*y[x]==x*Exp[2*x]+x^2*Exp[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{2 x} \left (x^2 \int _1^x\frac {1}{2} K[3] \left (e^{K[3]} K[3]+1\right )dK[3]+x \int _1^x-K[2]^2 \left (e^{K[2]} K[2]+1\right )dK[2]+\int _1^x\frac {1}{2} K[1]^3 \left (e^{K[1]} K[1]+1\right )dK[1]+c_3 x^2+c_2 x+c_1\right ) \]
Sympy. Time used: 0.433 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*exp(3*x) - x*exp(2*x) - 8*y(x) + 12*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 )} = \left (C_{1} + x \left (C_{2} + x \left (C_{3} + \frac {x^{2}}{24} + e^{x}\right ) - 6 e^{x}\right ) + 12 e^{x}\right ) e^{2 x} \]