10.5 problem 5

Internal problem ID [687]

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: 5.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

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

dsolve(diff(y(t),t$2)+y(t) = tan(t),y(t), singsol=all)
 

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

Solution by Mathematica

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

DSolve[y''[t]+y[t] == Tan[t],y[t],t,IncludeSingularSolutions -> True]
 

\begin{align*} y(t)\to c_2 \sin (t)+\cos (t) \left (\log \left (\cos \left (\frac {t}{2}\right )-\sin \left (\frac {t}{2}\right )\right )-\log \left (\sin \left (\frac {t}{2}\right )+\cos \left (\frac {t}{2}\right )\right )+c_1\right ) \\ \end{align*}