83.17.3 problem 3

Internal problem ID [19128]
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. Misc. Examples on chapter III at page 50
Problem number : 3
Date solved : Monday, March 31, 2025 at 06:49:09 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.008 (sec). Leaf size: 38
ode:=diff(diff(diff(diff(y(x),x),x),x),x)-y(x) = x*sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_4 \,{\mathrm e}^{-x}+\frac {\left (x^{2}+8 c_1 -2\right ) \cos \left (x \right )}{8}+\frac {\left (-3 x +8 c_3 \right ) \sin \left (x \right )}{8}+c_2 \,{\mathrm e}^{x} \]
Mathematica. Time used: 0.052 (sec). Leaf size: 47
ode=D[y[x],{x,4}]-y[x]==x*Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \left (\frac {x^2}{8}-\frac {5}{16}+c_2\right ) \cos (x)+c_1 e^x+c_3 e^{-x}+\left (-\frac {3 x}{8}+c_4\right ) \sin (x) \]
Sympy. Time used: 0.182 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*sin(x) - y(x) + Derivative(y(x), (x, 4)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{3} e^{- x} + C_{4} e^{x} + \left (C_{1} - \frac {3 x}{8}\right ) \sin {\left (x \right )} + \left (C_{2} + \frac {x^{2}}{8}\right ) \cos {\left (x \right )} \]