10.1.21 problem 21

Internal problem ID [1118]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.1. Page 40
Problem number : 21
Date solved : Monday, January 27, 2025 at 04:34:02 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} -\frac {y}{2}+y^{\prime }&=2 \cos \left (t \right ) \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=a \end{align*}

Solution by Maple

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

dsolve([-1/2*y(t)+diff(y(t),t) = 2*cos(t),y(0) = a],y(t), singsol=all)
 
\[ y = -\frac {4 \cos \left (t \right )}{5}+\frac {8 \sin \left (t \right )}{5}+{\mathrm e}^{\frac {t}{2}} a +\frac {4 \,{\mathrm e}^{\frac {t}{2}}}{5} \]

Solution by Mathematica

Time used: 0.050 (sec). Leaf size: 31

DSolve[{-1/2*y[t]+D[y[t],t] == 2*Cos[t],y[0]==a},y[t],t,IncludeSingularSolutions -> True]
 
\[ y(t)\to \frac {1}{5} \left ((5 a+4) e^{t/2}+8 \sin (t)-4 \cos (t)\right ) \]