1.27 problem 27

Internal problem ID [474]

Book: Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section: Section 2.1. Page 40
Problem number: 27.
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) = -1] \end {align*}

Solution by Maple

Time used: 0.016 (sec). Leaf size: 19

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

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

Solution by Mathematica

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

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

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