1.21 problem 21

Internal problem ID [468]

Book: Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section: Section 2.1. Page 40
Problem number: 21.
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [[_linear, class A]]

Solve \begin {gather*} \boxed {-\frac {y}{2}+y^{\prime }-2 \cos \relax (t )=0} \end {gather*} With initial conditions \begin {align*} [y \relax (0) = a] \end {align*}

Solution by Maple

Time used: 0.009 (sec). Leaf size: 21

dsolve([-1/2*y(t)+diff(y(t),t) = 2*cos(t),y(0) = a],y(t), singsol=all)
 

\[ y \relax (t ) = -\frac {4 \cos \relax (t )}{5}+\frac {8 \sin \relax (t )}{5}+{\mathrm e}^{\frac {t}{2}} a +\frac {4 \,{\mathrm e}^{\frac {t}{2}}}{5} \]

Solution by Mathematica

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

DSolve[{-1/2*y[t]+y'[t] == 2*Cos[t],y[0]==a},y[t],t,IncludeSingularSolutions -> True]
 

\begin{align*} y(t)\to \frac {1}{5} \left ((5 a+4) e^{t/2}+8 \sin (t)-4 \cos (t)\right ) \\ \end{align*}