75.16.32 problem 505

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

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

Maple. Time used: 0.008 (sec). Leaf size: 67
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+2*n^2*diff(diff(y(x),x),x)+n^4*y(x) = a*sin(n*x+alpha); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {a \left (-n^{2} x^{2}+2\right ) \sin \left (n x +\alpha \right )-2 n \left (a x \cos \left (n x +\alpha \right )-4 \left (\left (c_3 x +c_1 \right ) \cos \left (n x \right )+\sin \left (n x \right ) \left (c_4 x +c_2 \right )\right ) n^{3}\right )}{8 n^{4}} \]
Mathematica. Time used: 0.427 (sec). Leaf size: 188
ode=D[y[x],{x,4}]+2*n^2*D[y[x],{x,2}]+n^4*y[x]==a*Sin[n*x+\[Alpha]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \cos (n x) \int _1^x\frac {a (n \cos (n K[1]) K[1]-\sin (n K[1])) \sin (\alpha +n K[1])}{2 n^3}dK[1]+\sin (n x) \int _1^x\frac {a (\cos (n K[3])+n K[3] \sin (n K[3])) \sin (\alpha +n K[3])}{2 n^3}dK[3]+x \sin (n x) \int _1^x-\frac {a \sin (n K[4]) \sin (\alpha +n K[4])}{2 n^2}dK[4]+x \cos (n x) \int _1^x-\frac {a \cos (n K[2]) \sin (\alpha +n K[2])}{2 n^2}dK[2]+c_1 \cos (n x)+c_2 x \cos (n x)+c_3 \sin (n x)+c_4 x \sin (n x) \]
Sympy. Time used: 0.230 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
Alpha = symbols("Alpha") 
a = symbols("a") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-a*sin(Alpha + n*x) + n**4*y(x) + 2*n**2*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 4)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {a x^{2} \sin {\left (\mathrm {A} + n x \right )}}{8 n^{2}} + \left (C_{1} + C_{2} x\right ) e^{- i n x} + \left (C_{3} + C_{4} x\right ) e^{i n x} \]