75.16.31 problem 504

Internal problem ID [16933]
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 : 504
Date solved : Monday, March 31, 2025 at 03:35:48 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime \prime }+4 y^{\prime \prime }+4 y&=x \sin \left (2 x \right ) \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 40
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+4*diff(diff(y(x),x),x)+4*y(x) = x*sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_3 x +c_1 \right ) \cos \left (\sqrt {2}\, x \right )+\left (c_4 x +c_2 \right ) \sin \left (\sqrt {2}\, x \right )+\frac {x \sin \left (2 x \right )}{4}+\cos \left (2 x \right ) \]
Mathematica. Time used: 0.006 (sec). Leaf size: 58
ode=D[y[x],{x,4}]+4*D[y[x],{x,2}]+4*y[x]==x*Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{4} x \sin (2 x)+\cos (2 x)+(c_2 x+c_1) \cos \left (\sqrt {2} x\right )+c_3 \sin \left (\sqrt {2} x\right )+c_4 x \sin \left (\sqrt {2} x\right ) \]
Sympy. Time used: 0.172 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*sin(2*x) + 4*y(x) + 4*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 4)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x \sin {\left (2 x \right )}}{4} + \left (C_{1} + C_{2} x\right ) \sin {\left (\sqrt {2} x \right )} + \left (C_{3} + C_{4} x\right ) \cos {\left (\sqrt {2} x \right )} + \cos {\left (2 x \right )} \]