14.2 problem 8

14.2.1 Existence and uniqueness analysis
14.2.2 Solving as laplace ode
14.2.3 Maple step by step solution

Internal problem ID [12799]
Internal file name [OUTPUT/11452_Saturday_November_04_2023_08_47_23_AM_50152952/index.tex]

Book: Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section: Chapter 5. The Laplace Transform Method. Exercises 5.3, page 255
Problem number: 8.
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={\mathrm e}^{x}} \] With initial conditions \begin {align*} \left [y \left (0\right ) = {\frac {5}{2}}\right ] \end {align*}

14.2.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) &={\mathrm e}^{x} \end {align*}

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

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

14.2.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 {1}{s -1}\tag {1} \end {align*}

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

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

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

Adding the above results and simplifying gives \[ y=\frac {5 \cosh \left (x \right )}{2}-\frac {3 \sinh \left (x \right )}{2} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {5 \cosh \left (x \right )}{2}-\frac {3 \sinh \left (x \right )}{2} \\ \end{align*}

(a) Solution plot

(b) Slope field plot

Verification of solutions

\[ y = \frac {5 \cosh \left (x \right )}{2}-\frac {3 \sinh \left (x \right )}{2} \] Verified OK.

14.2.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime }+y={\mathrm e}^{x}, y \left (0\right )=\frac {5}{2}\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+{\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={\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 )=\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 \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 \mu \left (x \right ) {\mathrm e}^{x}d x +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=\frac {\int \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 \left ({\mathrm e}^{x}\right )^{2}d x +c_{1}}{{\mathrm e}^{x}} \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & y=\frac {\frac {\left ({\mathrm e}^{x}\right )^{2}}{2}+c_{1}}{{\mathrm e}^{x}} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y=\frac {{\mathrm e}^{x}}{2}+{\mathrm e}^{-x} c_{1} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=\frac {5}{2} \\ {} & {} & \frac {5}{2}=c_{1} +\frac {1}{2} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =2 \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =2\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & y=\frac {{\mathrm e}^{x}}{2}+2 \,{\mathrm e}^{-x} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y=\frac {{\mathrm e}^{x}}{2}+2 \,{\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.813 (sec). Leaf size: 13

dsolve([diff(y(x),x)+y(x)=exp(x),y(0) = 5/2],y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {5 \cosh \left (x \right )}{2}-\frac {3 \sinh \left (x \right )}{2} \]

Solution by Mathematica

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

DSolve[{y'[x]+y[x]==Exp[x],{y[0]==5/2}},y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to 2 e^{-x}+\frac {e^x}{2} \]