50.14.24 problem 3(h)

Internal problem ID [8062]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 2. Problems for Review and Discovery. Drill excercises. Page 105
Problem number : 3(h)
Date solved : Monday, January 27, 2025 at 03:41:09 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.005 (sec). Leaf size: 42

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

Solution by Mathematica

Time used: 0.080 (sec). Leaf size: 32

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