1.3 problem Example 5

1.3.1 Solving as linear ode
1.3.2 Maple step by step solution

Internal problem ID [1646]
Internal file name [OUTPUT/1647_Sunday_June_05_2022_02_25_47_AM_94630352/index.tex]

Book: Differential equations and their applications, 3rd ed., M. Braun
Section: Section 1.2. Page 6
Problem number: Example 5.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program :

Maple gives the following as the ode type

[_separable]

\[ \boxed {y^{\prime }-2 y t=t} \]

1.3.1 Solving as linear ode

Entering Linear first order ODE solver. In canonical form a linear first order is \begin {align*} y^{\prime } + p(t)y &= q(t) \end {align*}

Where here \begin {align*} p(t) &=-2 t\\ q(t) &=t \end {align*}

Hence the ode is \begin {align*} y^{\prime }-2 y t = t \end {align*}

The integrating factor \(\mu \) is \begin{align*} \mu &= {\mathrm e}^{\int -2 t d t} \\ &= {\mathrm e}^{-t^{2}} \\ \end{align*} The ode becomes \begin {align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}t}}\left ( \mu y\right ) &= \left (\mu \right ) \left (t\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}t}} \left ({\mathrm e}^{-t^{2}} y\right ) &= \left ({\mathrm e}^{-t^{2}}\right ) \left (t\right )\\ \mathrm {d} \left ({\mathrm e}^{-t^{2}} y\right ) &= \left (t \,{\mathrm e}^{-t^{2}}\right )\, \mathrm {d} t \end {align*}

Integrating gives \begin {align*} {\mathrm e}^{-t^{2}} y &= \int {t \,{\mathrm e}^{-t^{2}}\,\mathrm {d} t}\\ {\mathrm e}^{-t^{2}} y &= -\frac {{\mathrm e}^{-t^{2}}}{2} + c_{1} \end {align*}

Dividing both sides by the integrating factor \(\mu ={\mathrm e}^{-t^{2}}\) results in \begin {align*} y &= -\frac {{\mathrm e}^{t^{2}} {\mathrm e}^{-t^{2}}}{2}+c_{1} {\mathrm e}^{t^{2}} \end {align*}

which simplifies to \begin {align*} y &= -\frac {1}{2}+c_{1} {\mathrm e}^{t^{2}} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= -\frac {1}{2}+c_{1} {\mathrm e}^{t^{2}} \\ \end{align*}

Figure 1: Slope field plot

Verification of solutions

\[ y = -\frac {1}{2}+c_{1} {\mathrm e}^{t^{2}} \] Verified OK.

1.3.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }-2 y t =t \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=2 y t +t \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {y^{\prime }}{2 y+1}=t \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \frac {y^{\prime }}{2 y+1}d t =\int t d t +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \frac {\ln \left (2 y+1\right )}{2}=\frac {t^{2}}{2}+c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=\frac {{\mathrm e}^{t^{2}+2 c_{1}}}{2}-\frac {1}{2} \end {array} \]

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
<- 1st order linear successful`
 

Solution by Maple

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

dsolve(diff(y(t),t)-2*t*y(t)=t,y(t), singsol=all)
 

\[ y \left (t \right ) = -\frac {1}{2}+{\mathrm e}^{t^{2}} c_{1} \]

Solution by Mathematica

Time used: 0.041 (sec). Leaf size: 24

DSolve[y'[t]-2*t*y[t]==t,y[t],t,IncludeSingularSolutions -> True]
 

\begin{align*} y(t)\to -\frac {1}{2}+c_1 e^{t^2} \\ y(t)\to -\frac {1}{2} \\ \end{align*}