28.2.47 problem 47

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

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

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