15.11.28 problem 28

Internal problem ID [3138]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 19, page 86
Problem number : 28
Date solved : Monday, January 27, 2025 at 07:23:10 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

With initial conditions

\begin{align*} y \left (\frac {\pi }{2}\right )&=0\\ y^{\prime }\left (\frac {\pi }{2}\right )&=\frac {\pi }{2} \end{align*}

Solution by Maple

Time used: 0.017 (sec). Leaf size: 25

dsolve([diff(y(x),x$2)+4*y(x)=12*cos(x)^2,y(1/2*Pi) = 0, D(y)(1/2*Pi) = 1/2*Pi],y(x), singsol=all)
 
\[ y = \frac {\left (3 x -2 \pi \right ) \sin \left (2 x \right )}{2}+\frac {3 \cos \left (2 x \right )}{2}+\frac {3}{2} \]

Solution by Mathematica

Time used: 0.032 (sec). Leaf size: 23

DSolve[{D[y[x],{x,2}]+4*y[x]==12*Cos[x]^2,{y[Pi/2]==0,Derivative[1][y][Pi/2]==Pi/2}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \cos (x) ((3 x-2 \pi ) \sin (x)+3 \cos (x)) \]