75.16.36 problem 509

Internal problem ID [16938]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.3 Nonhomogeneous linear equations with constant coefficients. Trial and error method. Exercises page 132
Problem number : 509
Date solved : Monday, March 31, 2025 at 03:35:54 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime \prime }-4 y^{\prime \prime \prime }+6 y^{\prime \prime }-4 y^{\prime }+y&=x \,{\mathrm e}^{x} \end{align*}

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