Internal problem ID [6171]
Internal file name [OUTPUT/5419_Sunday_June_05_2022_03_36_46_PM_67387346/index.tex
]
Book: Differential Equations: Theory, Technique, and Practice by George Simmons, Steven
Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section: Chapter 1. What is a differential equation. Section 1.4 First Order Linear Equations.
Page 15
Problem number: 2(e).
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 }+4 y={\mathrm e}^{-x}} \] With initial conditions \begin {align*} [y \left (0\right ) = 0] \end {align*}
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) &=4\\ q(x) &={\mathrm e}^{-x} \end {align*}
Hence the ode is \begin {align*} y^{\prime }+4 y = {\mathrm e}^{-x} \end {align*}
The domain of \(p(x)=4\) is \[
\{-\infty
Entering Linear first order ODE solver. The integrating factor \(\mu \) is \begin{align*}
\mu &= {\mathrm e}^{\int 4d x} \\
&= {\mathrm e}^{4 x} \\
\end{align*} The ode becomes
\begin {align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left ({\mathrm e}^{-x}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left ({\mathrm e}^{4 x} y\right ) &= \left ({\mathrm e}^{4 x}\right ) \left ({\mathrm e}^{-x}\right )\\ \mathrm {d} \left ({\mathrm e}^{4 x} y\right ) &= {\mathrm e}^{3 x}\, \mathrm {d} x \end {align*}
Integrating gives \begin {align*} {\mathrm e}^{4 x} y &= \int {{\mathrm e}^{3 x}\,\mathrm {d} x}\\ {\mathrm e}^{4 x} y &= \frac {{\mathrm e}^{3 x}}{3} + c_{1} \end {align*}
Dividing both sides by the integrating factor \(\mu ={\mathrm e}^{4 x}\) results in \begin {align*} y &= \frac {{\mathrm e}^{-4 x} {\mathrm e}^{3 x}}{3}+c_{1} {\mathrm e}^{-4 x} \end {align*}
which simplifies to \begin {align*} y &= \frac {{\mathrm e}^{-x}}{3}+c_{1} {\mathrm e}^{-4 x} \end {align*}
Initial conditions are used to solve for \(c_{1}\). Substituting \(x=0\) and \(y=0\) in the above solution gives an
equation to solve for the constant of integration. \begin {align*} 0 = \frac {1}{3}+c_{1} \end {align*}
The solutions are \begin {align*} c_{1} = -{\frac {1}{3}} \end {align*}
Trying the constant \begin {align*} c_{1} = -{\frac {1}{3}} \end {align*}
Substituting this in the general solution gives \begin {align*} y&=\frac {{\mathrm e}^{-x}}{3}-\frac {{\mathrm e}^{-4 x}}{3} \end {align*}
The constant \(c_{1} = -{\frac {1}{3}}\) gives valid solution.
Summary
The solution(s) found are the following \begin{align*}
\tag{1} y &= \frac {{\mathrm e}^{-x}}{3}-\frac {{\mathrm e}^{-4 x}}{3} \\
\end{align*} Verification of solutions
\[
y = \frac {{\mathrm e}^{-x}}{3}-\frac {{\mathrm e}^{-4 x}}{3}
\] Verified OK. \[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime }+4 y={\mathrm e}^{-x}, y \left (0\right )=0\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 }=-4 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 }+4 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 }+4 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 }+4 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 )=4 \mu \left (x \right ) \\ \bullet & {} & \textrm {Solve to find the integrating factor}\hspace {3pt} \\ {} & {} & \mu \left (x \right )={\mathrm e}^{4 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}^{4 x} \\ {} & {} & y=\frac {\int {\mathrm e}^{-x} {\mathrm e}^{4 x}d x +c_{1}}{{\mathrm e}^{4 x}} \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & y=\frac {\frac {{\mathrm e}^{3 x}}{3}+c_{1}}{{\mathrm e}^{4 x}} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y=\frac {\left ({\mathrm e}^{3 x}+3 c_{1} \right ) {\mathrm e}^{-4 x}}{3} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=0 \\ {} & {} & 0=\frac {1}{3}+c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =-\frac {1}{3} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =-\frac {1}{3}\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & y=\frac {\left ({\mathrm e}^{3 x}-1\right ) {\mathrm e}^{-4 x}}{3} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y=\frac {\left ({\mathrm e}^{3 x}-1\right ) {\mathrm e}^{-4 x}}{3} \end {array} \]
Maple trace
✓ Solution by Maple
Time used: 0.016 (sec). Leaf size: 16
\[
y \left (x \right ) = \frac {\left ({\mathrm e}^{3 x}-1\right ) {\mathrm e}^{-4 x}}{3}
\]
✓ Solution by Mathematica
Time used: 0.056 (sec). Leaf size: 21
\[
y(x)\to \frac {1}{3} e^{-4 x} \left (e^{3 x}-1\right )
\]
3.15.2 Solving as linear ode
3.15.3 Maple step by step solution
`Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
<- 1st order linear successful`
dsolve([diff(y(x),x)+4*y(x)=exp(-x),y(0) = 0],y(x), singsol=all)
DSolve[{y'[x]+4*y[x]==Exp[-x],{y[0]==0}},y[x],x,IncludeSingularSolutions -> True]