69.16.34 problem 507

Internal problem ID [18294]
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 : 507
Date solved : Thursday, October 02, 2025 at 03:10:11 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&=\sin \left (x \right ) \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 29
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) = sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_4 \,x^{3}+c_3 \,x^{2}+c_2 x +c_1 \right ) {\mathrm e}^{-x}-\frac {\sin \left (x \right )}{4} \]
Mathematica. Time used: 0.062 (sec). Leaf size: 122
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]==Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-x} \left (x^3 \int _1^x\frac {1}{6} e^{K[4]} \sin (K[4])dK[4]+x^2 \int _1^x-\frac {1}{2} e^{K[3]} K[3] \sin (K[3])dK[3]+x \int _1^x\frac {1}{2} e^{K[2]} K[2]^2 \sin (K[2])dK[2]+\int _1^x-\frac {1}{6} e^{K[1]} K[1]^3 \sin (K[1])dK[1]+c_4 x^3+c_3 x^2+c_2 x+c_1\right ) \end{align*}
Sympy. Time used: 0.153 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) - sin(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} + C_{4} x\right )\right )\right ) e^{- x} - \frac {\sin {\left (x \right )}}{4} \]