1.15 problem 15

Internal problem ID [462]

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

CAS Maple gives this as type [_linear]

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

Solution by Maple

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

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

\[ y \relax (t ) = \frac {3 t^{4}-4 t^{3}+6 t^{2}+1}{12 t^{2}} \]

Solution by Mathematica

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

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

\begin{align*} y(t)\to \frac {1}{12} \left (3 t^2+\frac {1}{t^2}-4 t+6\right ) \\ \end{align*}