12.19.25 problem section 9.3, problem 25

Internal problem ID [2172]
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 25
Date solved : Saturday, March 29, 2025 at 11:49:57 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.006 (sec). Leaf size: 37
ode:=diff(diff(diff(diff(y(x),x),x),x),x)-2*diff(diff(diff(y(x),x),x),x)+2*diff(y(x),x)-y(x) = exp(x)*(1+x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_2 \,{\mathrm e}^{-x}+\frac {{\mathrm e}^{x} \left (x^{4}+48 c_4 \,x^{2}+2 x^{3}+48 c_3 x +48 c_1 \right )}{48} \]
Mathematica. Time used: 0.027 (sec). Leaf size: 55
ode=1*D[y[x],{x,4}]-2*D[y[x],{x,3}]-0*D[y[x],{x,2}]+2*D[y[x],x]-1*y[x]==Exp[x]*(1+x); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{96} e^x \left (2 x^4+4 x^3+(-6+96 c_4) x^2+(6+96 c_3) x-3+96 c_2\right )+c_1 e^{-x} \]
Sympy. Time used: 0.358 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x - 1)*exp(x) - y(x) + 2*Derivative(y(x), x) - 2*Derivative(y(x), (x, 3)) + Derivative(y(x), (x, 4)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{4} e^{- x} + \left (C_{1} + x \left (C_{2} + x \left (C_{3} + \frac {x^{2}}{48} + \frac {x}{24}\right )\right )\right ) e^{x} \]