75.17.16 problem 566

Internal problem ID [16986]
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. Superposition principle. Exercises page 137
Problem number : 566
Date solved : Thursday, March 13, 2025 at 09:05:38 AM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.253 (sec). Leaf size: 43
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) = x*exp(x)+1/2*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_4 x +c_{3} \right ) {\mathrm e}^{-x}+\frac {\left (8 c_{1} -x +1\right ) \cos \left (x \right )}{8}+\frac {\left (x -2\right ) {\mathrm e}^{x}}{8}+\frac {\sin \left (x \right ) \left (4 c_{2} +1\right )}{4} \]
Mathematica. Time used: 0.155 (sec). Leaf size: 158
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]==x*Exp[x]+1/2*Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-x} \left (e^x \cos (x) \int _1^x-\frac {1}{4} \cos (K[1]) \left (\cos (K[1])+2 e^{K[1]} K[1]\right )dK[1]+\int _1^x-\frac {1}{4} e^{K[3]} (K[3]-1) \left (\cos (K[3])+2 e^{K[3]} K[3]\right )dK[3]+x \int _1^x\frac {1}{4} e^{K[4]} \left (\cos (K[4])+2 e^{K[4]} K[4]\right )dK[4]+e^x \sin (x) \int _1^x-\frac {1}{4} \left (\cos (K[2])+2 e^{K[2]} K[2]\right ) \sin (K[2])dK[2]+c_4 x+c_1 e^x \cos (x)+c_2 e^x \sin (x)+c_3\right ) \]
Sympy. Time used: 0.395 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*exp(x) + y(x) - cos(x)/2 + 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_{4} \sin {\left (x \right )} + \left (C_{1} - \frac {x}{8}\right ) \cos {\left (x \right )} + \left (C_{2} + C_{3} x\right ) e^{- x} + \frac {\left (x - 2\right ) e^{x}}{8} \]