13.10.1 problem 1

Internal problem ID [2402]
Book : Differential equations and their applications, 3rd ed., M. Braun
Section : Section 2.4, The method of variation of parameters. Page 154
Problem number : 1
Date solved : Monday, January 27, 2025 at 05:51:42 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y&=\sec \left (t \right ) \end{align*}

Solution by Maple

Time used: 0.003 (sec). Leaf size: 22

dsolve(diff(y(t),t$2)+y(t)=sec(t),y(t), singsol=all)
 
\[ y = -\ln \left (\sec \left (t \right )\right ) \cos \left (t \right )+\cos \left (t \right ) c_1 +\sin \left (t \right ) \left (c_2 +t \right ) \]

Solution by Mathematica

Time used: 0.024 (sec). Leaf size: 22

DSolve[D[y[t],{t,2}]+y[t]==Sec[t],y[t],t,IncludeSingularSolutions -> True]
 
\[ y(t)\to (t+c_2) \sin (t)+\cos (t) (\log (\cos (t))+c_1) \]