20.9.7 problem Problem 7

Internal problem ID [3751]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.7, The Variation of Parameters Method. page 556
Problem number : Problem 7
Date solved : Monday, January 27, 2025 at 07:58:56 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+9 y&=\frac {36}{4-\cos \left (3 x \right )^{2}} \end{align*}

Solution by Maple

Time used: 0.006 (sec). Leaf size: 61

dsolve(diff(y(x),x$2)+9*y(x)=36/(4-cos(3*x)^2),y(x), singsol=all)
 
\[ y \left (x \right ) = \frac {4 \sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \sin \left (3 x \right )}{3}\right ) \sin \left (3 x \right )}{3}+\sin \left (3 x \right ) c_{2} -\cos \left (3 x \right ) \ln \left (\cos \left (3 x \right )-2\right )+\cos \left (3 x \right ) \ln \left (\cos \left (3 x \right )+2\right )+\cos \left (3 x \right ) c_{1} \]

Solution by Mathematica

Time used: 0.209 (sec). Leaf size: 61

DSolve[D[y[x],{x,2}]+9*y[x]==36/(4-Cos[3*x]^2),y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {4 \sin (3 x) \arctan \left (\frac {\sin (3 x)}{\sqrt {3}}\right )}{\sqrt {3}}+c_2 \sin (3 x)+\cos (3 x) (-\log (2-\cos (3 x))+\log (\cos (3 x)+2)+c_1) \]