28.2.46 problem 46

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

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

Maple. Time used: 0.006 (sec). Leaf size: 27
ode:=diff(diff(diff(y(x),x),x),x)-diff(diff(y(x),x),x)+diff(y(x),x)-y(x) = 15*sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \sin \left (2 x \right )+2 \cos \left (2 x \right )+\cos \left (x \right ) c_{1} +c_{2} {\mathrm e}^{x}+c_3 \sin \left (x \right ) \]
Mathematica. Time used: 0.005 (sec). Leaf size: 32
ode=D[y[x],{x,3}]-D[y[x],{x,2}]+D[y[x],x]-y[x]==15*Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sin (2 x)+2 \cos (2 x)+c_3 e^x+c_1 \cos (x)+c_2 \sin (x) \]
Sympy. Time used: 0.174 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) - 15*sin(2*x) + 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 (x \right )} + C_{3} \cos {\left (x \right )} + \sin {\left (2 x \right )} + 2 \cos {\left (2 x \right )} \]