75.16.68 problem 541

Internal problem ID [16970]
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 : 541
Date solved : Monday, March 31, 2025 at 03:36:48 PM
CAS classification : [[_high_order, _with_linear_symmetries]]

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

Maple. Time used: 0.004 (sec). Leaf size: 28
ode:=diff(diff(diff(diff(y(x),x),x),x),x)-2*diff(diff(diff(y(x),x),x),x)+2*diff(diff(y(x),x),x)-2*diff(y(x),x)+y(x) = exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (4 c_4 x +x^{2}+4 c_2 \right ) {\mathrm e}^{x}}{4}+c_1 \cos \left (x \right )+c_3 \sin \left (x \right ) \]
Mathematica. Time used: 0.033 (sec). Leaf size: 89
ode=D[y[x],{x,4}]-2*D[y[x],{x,3}]+2*D[y[x],{x,2}]-2*D[y[x],x]+y[x]==Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sin (x) \int _1^x\frac {1}{2} e^{K[2]} \sin (K[2])dK[2]+\cos (x) \int _1^x\frac {1}{2} e^{K[1]} \cos (K[1])dK[1]+\frac {e^x x^2}{4}-\frac {e^x x}{2}+c_4 e^x x+c_3 e^x+c_1 \cos (x)+c_2 \sin (x) \]
Sympy. Time used: 0.259 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) - exp(x) - 2*Derivative(y(x), x) + 2*Derivative(y(x), (x, 2)) - 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_{3} \sin {\left (x \right )} + C_{4} \cos {\left (x \right )} + \left (C_{1} + x \left (C_{2} + \frac {x}{4}\right )\right ) e^{x} \]