12.19.12 problem section 9.3, problem 12

Internal problem ID [2159]
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 12
Date solved : Saturday, March 29, 2025 at 11:49:42 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} 8 y^{\prime \prime \prime }-12 y^{\prime \prime }+6 y^{\prime }-y&={\mathrm e}^{\frac {x}{2}} \left (1+4 x \right ) \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 33
ode:=8*diff(diff(diff(y(x),x),x),x)-12*diff(diff(y(x),x),x)+6*diff(y(x),x)-y(x) = exp(1/2*x)*(1+4*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (x^{4}+x^{3}+\left (48 c_3 +\frac {3}{16}\right ) x^{2}+48 c_2 x +48 c_1 \right ) {\mathrm e}^{\frac {x}{2}}}{48} \]
Mathematica. Time used: 0.009 (sec). Leaf size: 39
ode=8*D[y[x],{x,3}]-12*D[y[x],{x,2}]+6*D[y[x],x]-y[x]==Exp[x/2]*(1+4*x); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{48} e^{x/2} \left (x^4+x^3+48 c_3 x^2+48 c_2 x+48 c_1\right ) \]
Sympy. Time used: 0.340 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-4*x - 1)*exp(x/2) - y(x) + 6*Derivative(y(x), x) - 12*Derivative(y(x), (x, 2)) + 8*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}}{48} + \frac {x}{48}\right )\right )\right ) e^{\frac {x}{2}} \]