28.2.30 problem 30

Internal problem ID [4473]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 4. Linear Differential Equations. Page 183
Problem number : 30
Date solved : Tuesday, March 04, 2025 at 06:46:10 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.004 (sec). Leaf size: 37
ode:=diff(diff(diff(y(x),x),x),x)+diff(diff(y(x),x),x)+5*diff(y(x),x)+5*y(x) = 5*cos(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = c_3 \sin \left (\sqrt {5}\, x \right )+{\mathrm e}^{-x} c_{1} +c_{2} \cos \left (\sqrt {5}\, x \right )+\cos \left (2 x \right )+2 \sin \left (2 x \right ) \]
Mathematica. Time used: 0.008 (sec). Leaf size: 46
ode=D[y[x],{x,3}]+D[y[x],{x,2}]+5*D[y[x],x]+5*y[x]==5*Cos[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 2 \sin (2 x)+\cos (2 x)+c_3 e^{-x}+c_1 \cos \left (\sqrt {5} x\right )+c_2 \sin \left (\sqrt {5} x\right ) \]
Sympy. Time used: 0.240 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(5*y(x) - 5*cos(2*x) + 5*Derivative(y(x), x) + Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- x} + C_{2} \sin {\left (\sqrt {5} x \right )} + C_{3} \cos {\left (\sqrt {5} x \right )} + 2 \sin {\left (2 x \right )} + \cos {\left (2 x \right )} \]