73.17.41 problem 41

Internal problem ID [15504]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 25. Review exercises for part III. page 447
Problem number : 41
Date solved : Monday, March 31, 2025 at 01:39:46 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.003 (sec). Leaf size: 27
ode:=diff(diff(y(x),x),x)+6*diff(y(x),x)+9*y(x) = 2*cos(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_1 x +c_2 \right ) {\mathrm e}^{-3 x}+\frac {10 \cos \left (2 x \right )}{169}+\frac {24 \sin \left (2 x \right )}{169} \]
Mathematica. Time used: 0.02 (sec). Leaf size: 35
ode=D[y[x],{x,2}]+6*D[y[x],x]+9*y[x]==2*Cos[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {24}{169} \sin (2 x)+\frac {10}{169} \cos (2 x)+e^{-3 x} (c_2 x+c_1) \]
Sympy. Time used: 0.256 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(9*y(x) - 2*cos(2*x) + 6*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + C_{2} x\right ) e^{- 3 x} + \frac {24 \sin {\left (2 x \right )}}{169} + \frac {10 \cos {\left (2 x \right )}}{169} \]