40.11.4 problem 29

Internal problem ID [6738]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 16. Linear equations with constant coefficients (Short methods). Supplemetary problems. Page 107
Problem number : 29
Date solved : Sunday, March 30, 2025 at 11:21:03 AM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

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

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