73.14.8 problem 21.10

Internal problem ID [15339]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 21. Nonhomogeneous equations in general. Additional exercises page 391
Problem number : 21.10
Date solved : Thursday, March 13, 2025 at 05:55:19 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

With initial conditions

\begin{align*} y \left (0\right )&=-10\\ y^{\prime }\left (0\right )&=9 \end{align*}

Maple. Time used: 0.027 (sec). Leaf size: 27
ode:=diff(diff(y(x),x),x)+6*diff(y(x),x)+9*y(x) = 169*sin(2*x); 
ic:=y(0) = -10, D(y)(0) = 9; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \left (2+5 x \right ) {\mathrm e}^{-3 x}-12 \cos \left (2 x \right )+5 \sin \left (2 x \right ) \]
Mathematica. Time used: 0.023 (sec). Leaf size: 34
ode=D[y[x],{x,2}]+6*D[y[x],x]+9*y[x]==169*Sin[2*x]; 
ic={y[0]==-10,Derivative[1][y][0] ==9}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-3 x} \left (5 x+5 e^{3 x} \sin (2 x)+2\right )-12 \cos (2 x) \]
Sympy. Time used: 0.260 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(9*y(x) - 169*sin(2*x) + 6*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): -10, Subs(Derivative(y(x), x), x, 0): 9} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (5 x + 2\right ) e^{- 3 x} + 5 \sin {\left (2 x \right )} - 12 \cos {\left (2 x \right )} \]