35.6.15 problem 15

Internal problem ID [6165]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 6. SECOND-ORDER LINEAR EQUATIONSWITH CONSTANT COEFFICIENTS AND RIGHT-HAND SIDE NOT ZERO. page 422
Problem number : 15
Date solved : Sunday, March 30, 2025 at 10:41:44 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.003 (sec). Leaf size: 31
ode:=5*diff(diff(y(x),x),x)+12*diff(y(x),x)+20*y(x) = 120*sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-\frac {6 x}{5}} \sin \left (\frac {8 x}{5}\right ) c_2 +{\mathrm e}^{-\frac {6 x}{5}} \cos \left (\frac {8 x}{5}\right ) c_1 -5 \cos \left (2 x \right ) \]
Mathematica. Time used: 0.024 (sec). Leaf size: 44
ode=5*D[y[x],{x,2}]+12*D[y[x],x]+20*y[x]==120*Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -5 \cos (2 x)+c_2 e^{-6 x/5} \cos \left (\frac {8 x}{5}\right )+c_1 e^{-6 x/5} \sin \left (\frac {8 x}{5}\right ) \]
Sympy. Time used: 0.232 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(20*y(x) - 120*sin(2*x) + 12*Derivative(y(x), x) + 5*Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} \sin {\left (\frac {8 x}{5} \right )} + C_{2} \cos {\left (\frac {8 x}{5} \right )}\right ) e^{- \frac {6 x}{5}} - 5 \cos {\left (2 x \right )} \]