13.3 problem 3

13.3.1 Solving as laplace ode
13.3.2 Maple step by step solution

Internal problem ID [12786]
Internal file name [OUTPUT/11439_Saturday_November_04_2023_08_47_19_AM_18391819/index.tex]

Book: Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section: Chapter 5. The Laplace Transform Method. Exercises 5.2, page 248
Problem number: 3.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

[_quadrature]

\[ \boxed {y^{\prime }+2 y=4} \]

13.3.1 Solving as laplace ode

Since no initial condition is explicitly given, then let \begin {align*} y \left (0\right ) = c_{1} \end {align*}

Solving using the Laplace transform method. Let \[ \mathcal {L}\left (y\right ) =Y(s) \] Taking the Laplace transform of the ode and using the relations that \begin {align*} \mathcal {L}\left (y^{\prime }\right )&= s Y(s) - y \left (0\right ) \end {align*}

The given ode now becomes an algebraic equation in the Laplace domain \begin {align*} s Y \left (s \right )-y \left (0\right )+2 Y \left (s \right ) = \frac {4}{s}\tag {1} \end {align*}

Replacing initial condition gives \begin {align*} s Y \left (s \right )-c_{1} +2 Y \left (s \right ) = \frac {4}{s} \end {align*}

Solving for \(Y(s)\) gives \begin {align*} Y(s) = \frac {c_{1} s +4}{s \left (s +2\right )} \end {align*}

Applying partial fractions decomposition results in \[ Y(s)= \frac {c_{1} -2}{s +2}+\frac {2}{s} \] The inverse Laplace of each term above is now found, which gives \begin {align*} \mathcal {L}^{-1}\left (\frac {c_{1} -2}{s +2}\right ) &= \left (c_{1} -2\right ) {\mathrm e}^{-2 x}\\ \mathcal {L}^{-1}\left (\frac {2}{s}\right ) &= 2 \end {align*}

Adding the above results and simplifying gives \[ y=2+\left (c_{1} -2\right ) {\mathrm e}^{-2 x} \]

Summary

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

Figure 242: Slope field plot

Verification of solutions

\[ y = 2+\left (c_{1} -2\right ) {\mathrm e}^{-2 x} \] Verified OK.

13.3.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }+2 y=4 \\ \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+4 \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {y^{\prime }}{-2 y+4}=1 \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \frac {y^{\prime }}{-2 y+4}d x =\int 1d x +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & -\frac {\ln \left (-y+2\right )}{2}=x +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=-{\mathrm e}^{-2 x -2 c_{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: 5.422 (sec). Leaf size: 15

dsolve(diff(y(x),x)+2*y(x)=4,y(x), singsol=all)
 

\[ y \left (x \right ) = \left (y \left (0\right )-2\right ) {\mathrm e}^{-2 x}+2 \]

Solution by Mathematica

Time used: 0.039 (sec). Leaf size: 20

DSolve[y'[x]+2*y[x]==4,y[x],x,IncludeSingularSolutions -> True]
 

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