83.16.6 problem 6

Internal problem ID [19116]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter III. Ordinary linear differential equations with constant coefficients. Exercise III (H) at page 47
Problem number : 6
Date solved : Thursday, March 13, 2025 at 01:43:33 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime \prime }+y^{\prime \prime }+y&=a \,x^{2}+b \,{\mathrm e}^{-x} \sin \left (2 x \right ) \end{align*}

Maple. Time used: 0.820 (sec). Leaf size: 75
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+diff(diff(y(x),x),x)+y(x) = a*x^2+b*exp(-x)*sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \left (\left ({\mathrm e}^{\frac {x}{2}} c_{1} +c_3 \,{\mathrm e}^{\frac {3 x}{2}}\right ) \cos \left (\frac {\sqrt {3}\, x}{2}\right )+\left ({\mathrm e}^{\frac {x}{2}} c_{2} +c_4 \,{\mathrm e}^{\frac {3 x}{2}}\right ) \sin \left (\frac {\sqrt {3}\, x}{2}\right )-\frac {20 \cos \left (2 x \right ) b}{481}-\frac {9 b \sin \left (2 x \right )}{481}+a \,{\mathrm e}^{x} \left (x^{2}-2\right )\right ) {\mathrm e}^{-x} \]
Mathematica. Time used: 3.186 (sec). Leaf size: 112
ode=D[y[x],{x,4}]+D[y[x],{x,2}]+y[x]==a*x^2+b*Exp[-x]*Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to a x^2-2 a-\frac {9}{481} b e^{-x} \sin (2 x)-\frac {20}{481} b e^{-x} \cos (2 x)+e^{-x/2} \left (c_2 e^x+c_4\right ) \cos \left (\frac {\sqrt {3} x}{2}\right )+c_1 e^{-x/2} \sin \left (\frac {\sqrt {3} x}{2}\right )+c_3 e^{x/2} \sin \left (\frac {\sqrt {3} x}{2}\right ) \]
Sympy. Time used: 0.315 (sec). Leaf size: 90
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-a*x**2 - b*exp(-x)*sin(2*x) + y(x) + Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 4)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = a x^{2} - 2 a + \frac {b \left (- 9 \sin {\left (2 x \right )} - 20 \cos {\left (2 x \right )}\right ) e^{- x}}{481} + \left (C_{1} \sin {\left (\frac {\sqrt {3} x}{2} \right )} + C_{2} \cos {\left (\frac {\sqrt {3} x}{2} \right )}\right ) e^{- \frac {x}{2}} + \left (C_{3} \sin {\left (\frac {\sqrt {3} x}{2} \right )} + C_{4} \cos {\left (\frac {\sqrt {3} x}{2} \right )}\right ) e^{\frac {x}{2}} \]