13.9 problem 9

13.9.1 Existence and uniqueness analysis
13.9.2 Solving as laplace ode
13.9.3 Maple step by step solution

Internal problem ID [12792]
Internal file name [OUTPUT/11445_Saturday_November_04_2023_08_47_21_AM_30044945/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: 9.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "exact", "linear", "first_order_ode_lie_symmetry_lookup"

Maple gives the following as the ode type

[[_linear, `class A`]]

\[ \boxed {y^{\prime }-y=2 \,{\mathrm e}^{x}} \] With initial conditions \begin {align*} [y \left (0\right ) = 1] \end {align*}

13.9.1 Existence and uniqueness analysis

This is a linear ODE. In canonical form it is written as \begin {align*} y^{\prime } + p(x)y &= q(x) \end {align*}

Where here \begin {align*} p(x) &=-1\\ q(x) &=2 \,{\mathrm e}^{x} \end {align*}

Hence the ode is \begin {align*} y^{\prime }-y = 2 \,{\mathrm e}^{x} \end {align*}

The domain of \(p(x)=-1\) is \[ \{-\infty

13.9.2 Solving as laplace ode

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 )-Y \left (s \right ) = \frac {2}{s -1}\tag {1} \end {align*}

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

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

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

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

Summary

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

(a) Solution plot

(b) Slope field plot

Verification of solutions

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

13.9.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime }-y=2 \,{\mathrm e}^{x}, y \left (0\right )=1\right ] \\ \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 }=y+2 \,{\mathrm e}^{x} \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE}\hspace {3pt} \\ {} & {} & y^{\prime }-y=2 \,{\mathrm e}^{x} \\ \bullet & {} & \textrm {The ODE is linear; multiply by an integrating factor}\hspace {3pt} \mu \left (x \right ) \\ {} & {} & \mu \left (x \right ) \left (y^{\prime }-y\right )=2 \mu \left (x \right ) {\mathrm e}^{x} \\ \bullet & {} & \textrm {Assume the lhs of the ODE is the total derivative}\hspace {3pt} \frac {d}{d x}\left (y \mu \left (x \right )\right ) \\ {} & {} & \mu \left (x \right ) \left (y^{\prime }-y\right )=y^{\prime } \mu \left (x \right )+y \mu ^{\prime }\left (x \right ) \\ \bullet & {} & \textrm {Isolate}\hspace {3pt} \mu ^{\prime }\left (x \right ) \\ {} & {} & \mu ^{\prime }\left (x \right )=-\mu \left (x \right ) \\ \bullet & {} & \textrm {Solve to find the integrating factor}\hspace {3pt} \\ {} & {} & \mu \left (x \right )={\mathrm e}^{-x} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \left (\frac {d}{d x}\left (y \mu \left (x \right )\right )\right )d x =\int 2 \mu \left (x \right ) {\mathrm e}^{x}d x +c_{1} \\ \bullet & {} & \textrm {Evaluate the integral on the lhs}\hspace {3pt} \\ {} & {} & y \mu \left (x \right )=\int 2 \mu \left (x \right ) {\mathrm e}^{x}d x +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=\frac {\int 2 \mu \left (x \right ) {\mathrm e}^{x}d x +c_{1}}{\mu \left (x \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (x \right )={\mathrm e}^{-x} \\ {} & {} & y=\frac {\int 2 \,{\mathrm e}^{-x} {\mathrm e}^{x}d x +c_{1}}{{\mathrm e}^{-x}} \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & y=\frac {2 x +c_{1}}{{\mathrm e}^{-x}} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y={\mathrm e}^{x} \left (2 x +c_{1} \right ) \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=1 \\ {} & {} & 1=c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =1 \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =1\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & y=\left (2 x +1\right ) {\mathrm e}^{x} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y=\left (2 x +1\right ) {\mathrm e}^{x} \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.094 (sec). Leaf size: 12

dsolve([diff(y(x),x)-y(x)=2*exp(x),y(0) = 1],y(x), singsol=all)
 

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

Solution by Mathematica

Time used: 0.067 (sec). Leaf size: 14

DSolve[{y'[x]-y[x]==2*Exp[x],{y[0]==1}},y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to e^x (2 x+1) \]