10.12 problem 12

Internal problem ID [694]

Book: Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section: Chapter 3, Second order linear equations, section 3.6, Variation of Parameters. page 190
Problem number: 12.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

Solve \begin {gather*} \boxed {y^{\prime \prime }+4 y-g \relax (t )=0} \end {gather*}

Solution by Maple

Time used: 0.0 (sec). Leaf size: 47

dsolve(diff(y(t),t$2)+4*y(t) = g(t),y(t), singsol=all)
 

\[ y \relax (t ) = c_{2} \sin \left (2 t \right )+\cos \left (2 t \right ) c_{1}+\frac {\left (\int \cos \left (2 t \right ) g \relax (t )d t \right ) \sin \left (2 t \right )}{2}-\frac {\left (\int \sin \left (2 t \right ) g \relax (t )d t \right ) \cos \left (2 t \right )}{2} \]

Solution by Mathematica

Time used: 0.046 (sec). Leaf size: 59

DSolve[y''[t]+4*y[t] == g[t],y[t],t,IncludeSingularSolutions -> True]
 

\begin{align*} y(t)\to \sin (2 t) \left (\int _1^t\frac {1}{2} \cos (2 K[2]) g(K[2])dK[2]+c_2\right )+\cos (2 t) \left (\int _1^t-\cos (K[1]) g(K[1]) \sin (K[1])dK[1]+c_1\right ) \\ \end{align*}