15.11.25 problem 25

Internal problem ID [3135]
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 : 25
Date solved : Monday, January 27, 2025 at 07:23:03 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.033 (sec). Leaf size: 24

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

Solution by Mathematica

Time used: 0.028 (sec). Leaf size: 27

DSolve[D[y[x],{x,2}]+4*y[x]==8*Sin[x]^2,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to (-1+c_1) \cos (2 x)+(-x+c_2) \sin (2 x)+1 \]