3.13 problem 13

3.13.1 Solving as linear ode
3.13.2 Maple step by step solution

Internal problem ID [4773]
Internal file name [OUTPUT/4266_Sunday_June_05_2022_12_50_10_PM_77201851/index.tex]

Book: Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section: Chapter 8, Ordinary differential equations. Section 3. Linear First-Order Equations. page 403
Problem number: 13.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

[[_linear, `class A`]]

\[ \boxed {x^{\prime }+x={\mathrm e}^{y}} \]

3.13.1 Solving as linear ode

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

Where here \begin {align*} p(y) &=1\\ q(y) &={\mathrm e}^{y} \end {align*}

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

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

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

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

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

Summary

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

Figure 14: Slope field plot

Verification of solutions

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

3.13.2 Maple step by step solution

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

dsolve(diff(x(y),y)+(x(y)-exp(y))=0,x(y), singsol=all)
 

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

Solution by Mathematica

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

DSolve[x'[y]+(x[y]-Exp[y])==0,x[y],y,IncludeSingularSolutions -> True]
 

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