Internal problem ID [6395]
Internal file name [OUTPUT/5643_Sunday_June_05_2022_03_45_43_PM_45346907/index.tex
]
Book: Differential Equations: Theory, Technique, and Practice by George Simmons, Steven
Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section: Chapter 2. Problems for Review and Discovery. Drill excercises. Page 105
Problem number: 4(a).
ODE order: 2.
ODE degree: 1.
The type(s) of ODE detected by this program : "reduction_of_order", "second_order_linear_constant_coeff"
Maple gives the following as the ode type
[[_2nd_order, _with_linear_symmetries]]
\[ \boxed {y^{\prime \prime }-y=3 \,{\mathrm e}^{2 x}} \] Given that one solution of the ode is \begin {align*} y_1 &= {\mathrm e}^{2 x} \end {align*}
This is second order nonhomogeneous ODE. In standard form the ODE is \[ A y''(x) + B y'(x) + C y(x) = f(x) \] Where \(A=1, B=0, C=-1, f(x)=3 \,{\mathrm e}^{2 x}\). Let the solution be \[ y = y_h + y_p \] Where \(y_h\) is the solution to the homogeneous ODE \( A y''(x) + B y'(x) + C y(x) = 0\), and \(y_p\) is a particular solution to the inhomogeneous ODE \(A y''(x) + B y'(x) + C y(x) = f(x)\). \(y_h\) is the solution to \[ y^{\prime \prime }-y = 0 \] Given one basis solution \(y_{1}\left (x \right )\), then the second basis solution is given by \[ y_{2}\left (x \right ) = y_{1} \left (\int \frac {{\mathrm e}^{-\left (\int p d x \right )}}{y_{1}^{2}}d x \right ) \] Where \(p(x)\) is the coefficient of \(y^{\prime }\) when the ode is written in the normal form \[ y^{\prime \prime }+p \left (x \right ) y^{\prime }+q \left (x \right ) y = f \left (x \right ) \] Looking at the ode to solve shows that \[ p \left (x \right ) = 0 \] Therefore \begin{align*} y_{2}\left (x \right ) &= {\mathrm e}^{2 x} \left (\int {\mathrm e}^{-\left (\int 0d x \right )} {\mathrm e}^{-4 x}d x \right ) \\ y_{2}\left (x \right ) &= {\mathrm e}^{2 x} \int \frac {1}{{\mathrm e}^{4 x}} , dx \\ y_{2}\left (x \right ) &= {\mathrm e}^{2 x} \left (\int {\mathrm e}^{-4 x}d x \right ) \\ y_{2}\left (x \right ) &= -\frac {{\mathrm e}^{2 x} {\mathrm e}^{-4 x}}{4} \\ \end{align*} Hence the solution is \begin{align*} y &= c_{1} y_{1}\left (x \right )+c_{2} y_{2}\left (x \right ) \\ &= c_{1} {\mathrm e}^{2 x}-\frac {c_{2} {\mathrm e}^{2 x} {\mathrm e}^{-4 x}}{4} \\ \end{align*} Therefore the homogeneous solution \(y_h\) is \[ y_h = c_{1} {\mathrm e}^{2 x}-\frac {c_{2} {\mathrm e}^{2 x} {\mathrm e}^{-4 x}}{4} \] The particular solution \(y_p\) can be found using either the method of undetermined coefficients, or the method of variation of parameters. The method of variation of parameters will be used as it is more general and can be used when the coefficients of the ODE depend on \(x\) as well. Let \begin{equation} \tag{1} y_p(x) = u_1 y_1 + u_2 y_2 \end{equation} Where \(u_1,u_2\) to be determined, and \(y_1,y_2\) are the two basis solutions (the two linearly independent solutions of the homogeneous ODE) found earlier when solving the homogeneous ODE as \begin{align*} y_1 &= {\mathrm e}^{2 x} \\ y_2 &= -\frac {{\mathrm e}^{2 x} {\mathrm e}^{-4 x}}{4} \\ \end{align*} In the Variation of parameters \(u_1,u_2\) are found using \begin{align*} \tag{2} u_1 &= -\int \frac {y_2 f(x)}{a W(x)} \\ \tag{3} u_2 &= \int \frac {y_1 f(x)}{a W(x)} \\ \end{align*} Where \(W(x)\) is the Wronskian and \(a\) is the coefficient in front of \(y''\) in the given ODE. The Wronskian is given by \(W= \begin {vmatrix} y_1 & y_{2} \\ y_{1}^{\prime } & y_{2}^{\prime } \end {vmatrix} \). Hence \[ W = \begin {vmatrix} {\mathrm e}^{2 x} & -\frac {{\mathrm e}^{2 x} {\mathrm e}^{-4 x}}{4} \\ \frac {d}{dx}\left ({\mathrm e}^{2 x}\right ) & \frac {d}{dx}\left (-\frac {{\mathrm e}^{2 x} {\mathrm e}^{-4 x}}{4}\right ) \end {vmatrix} \] Which gives \[ W = \begin {vmatrix} {\mathrm e}^{2 x} & -\frac {{\mathrm e}^{2 x} {\mathrm e}^{-4 x}}{4} \\ 2 \,{\mathrm e}^{2 x} & \frac {{\mathrm e}^{2 x} {\mathrm e}^{-4 x}}{2} \end {vmatrix} \] Therefore \[ W = \left ({\mathrm e}^{2 x}\right )\left (\frac {{\mathrm e}^{2 x} {\mathrm e}^{-4 x}}{2}\right ) - \left (-\frac {{\mathrm e}^{2 x} {\mathrm e}^{-4 x}}{4}\right )\left (2 \,{\mathrm e}^{2 x}\right ) \] Which simplifies to \[ W = {\mathrm e}^{4 x} {\mathrm e}^{-4 x} \] Which simplifies to \[ W = 1 \] Therefore Eq. (2) becomes \[ u_1 = -\int \frac {-\frac {3 \,{\mathrm e}^{4 x} {\mathrm e}^{-4 x}}{4}}{1}\,dx \] Which simplifies to \[ u_1 = - \int -\frac {3}{4}d x \] Hence \[ u_1 = \frac {3 x}{4} \] And Eq. (3) becomes \[ u_2 = \int \frac {3 \,{\mathrm e}^{4 x}}{1}\,dx \] Which simplifies to \[ u_2 = \int 3 \,{\mathrm e}^{4 x}d x \] Hence \[ u_2 = \frac {3 \,{\mathrm e}^{4 x}}{4} \] Therefore the particular solution, from equation (1) is \[ y_p(x) = \frac {3 \,{\mathrm e}^{2 x} x}{4}-\frac {3 \,{\mathrm e}^{4 x} {\mathrm e}^{2 x} {\mathrm e}^{-4 x}}{16} \] Which simplifies to \[ y_p(x) = \frac {3 \,{\mathrm e}^{2 x} \left (-1+4 x \right )}{16} \] Therefore the general solution is \begin {align*} y &= y_h + y_p \\ &= \left (c_{1} {\mathrm e}^{2 x}-\frac {c_{2} {\mathrm e}^{2 x} {\mathrm e}^{-4 x}}{4}\right ) + \left (\frac {3 \,{\mathrm e}^{2 x} \left (-1+4 x \right )}{16}\right ) \end {align*}
Which simplifies to \[ y = c_{1} {\mathrm e}^{2 x}-\frac {c_{2} {\mathrm e}^{-2 x}}{4}+\frac {3 \,{\mathrm e}^{2 x} \left (-1+4 x \right )}{16} \]
The solution(s) found are the following \begin{align*} \tag{1} y &= c_{1} {\mathrm e}^{2 x}-\frac {c_{2} {\mathrm e}^{-2 x}}{4}+\frac {3 \,{\mathrm e}^{2 x} \left (-1+4 x \right )}{16} \\ \end{align*}
Verification of solutions
\[ y = c_{1} {\mathrm e}^{2 x}-\frac {c_{2} {\mathrm e}^{-2 x}}{4}+\frac {3 \,{\mathrm e}^{2 x} \left (-1+4 x \right )}{16} \] Verified OK.
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime \prime }-y=3 \,{\mathrm e}^{2 x} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & y^{\prime \prime } \\ \bullet & {} & \textrm {Characteristic polynomial of homogeneous ODE}\hspace {3pt} \\ {} & {} & r^{2}-1=0 \\ \bullet & {} & \textrm {Factor the characteristic polynomial}\hspace {3pt} \\ {} & {} & \left (r -1\right ) \left (r +1\right )=0 \\ \bullet & {} & \textrm {Roots of the characteristic polynomial}\hspace {3pt} \\ {} & {} & r =\left (-1, 1\right ) \\ \bullet & {} & \textrm {1st solution of the homogeneous ODE}\hspace {3pt} \\ {} & {} & y_{1}\left (x \right )={\mathrm e}^{-x} \\ \bullet & {} & \textrm {2nd solution of the homogeneous ODE}\hspace {3pt} \\ {} & {} & y_{2}\left (x \right )={\mathrm e}^{x} \\ \bullet & {} & \textrm {General solution of the ODE}\hspace {3pt} \\ {} & {} & y=c_{1} y_{1}\left (x \right )+c_{2} y_{2}\left (x \right )+y_{p}\left (x \right ) \\ \bullet & {} & \textrm {Substitute in solutions of the homogeneous ODE}\hspace {3pt} \\ {} & {} & y=c_{1} {\mathrm e}^{-x}+c_{2} {\mathrm e}^{x}+y_{p}\left (x \right ) \\ \square & {} & \textrm {Find a particular solution}\hspace {3pt} y_{p}\left (x \right )\hspace {3pt}\textrm {of the ODE}\hspace {3pt} \\ {} & \circ & \textrm {Use variation of parameters to find}\hspace {3pt} y_{p}\hspace {3pt}\textrm {here}\hspace {3pt} f \left (x \right )\hspace {3pt}\textrm {is the forcing function}\hspace {3pt} \\ {} & {} & \left [y_{p}\left (x \right )=-y_{1}\left (x \right ) \left (\int \frac {y_{2}\left (x \right ) f \left (x \right )}{W \left (y_{1}\left (x \right ), y_{2}\left (x \right )\right )}d x \right )+y_{2}\left (x \right ) \left (\int \frac {y_{1}\left (x \right ) f \left (x \right )}{W \left (y_{1}\left (x \right ), y_{2}\left (x \right )\right )}d x \right ), f \left (x \right )=3 \,{\mathrm e}^{2 x}\right ] \\ {} & \circ & \textrm {Wronskian of solutions of the homogeneous equation}\hspace {3pt} \\ {} & {} & W \left (y_{1}\left (x \right ), y_{2}\left (x \right )\right )=\left [\begin {array}{cc} {\mathrm e}^{-x} & {\mathrm e}^{x} \\ -{\mathrm e}^{-x} & {\mathrm e}^{x} \end {array}\right ] \\ {} & \circ & \textrm {Compute Wronskian}\hspace {3pt} \\ {} & {} & W \left (y_{1}\left (x \right ), y_{2}\left (x \right )\right )=2 \\ {} & \circ & \textrm {Substitute functions into equation for}\hspace {3pt} y_{p}\left (x \right ) \\ {} & {} & y_{p}\left (x \right )=-\frac {3 \,{\mathrm e}^{-x} \left (\int {\mathrm e}^{3 x}d x \right )}{2}+\frac {3 \,{\mathrm e}^{x} \left (\int {\mathrm e}^{x}d x \right )}{2} \\ {} & \circ & \textrm {Compute integrals}\hspace {3pt} \\ {} & {} & y_{p}\left (x \right )={\mathrm e}^{2 x} \\ \bullet & {} & \textrm {Substitute particular solution into general solution to ODE}\hspace {3pt} \\ {} & {} & y=c_{1} {\mathrm e}^{-x}+c_{2} {\mathrm e}^{x}+{\mathrm e}^{2 x} \end {array} \]
Maple trace
`Methods for second order ODEs: --- Trying classification methods --- trying a quadrature trying high order exact linear fully integrable trying differential order: 2; linear nonhomogeneous with symmetry [0,1] trying a double symmetry of the form [xi=0, eta=F(x)] -> Try solving first the homogeneous part of the ODE checking if the LODE has constant coefficients <- constant coefficients successful <- solving first the homogeneous part of the ODE successful`
✓ Solution by Maple
Time used: 0.0 (sec). Leaf size: 19
dsolve([diff(y(x),x$2)-y(x)=3*exp(2*x),exp(2*x)],singsol=all)
\[ y \left (x \right ) = c_{2} {\mathrm e}^{-x}+{\mathrm e}^{x} c_{1} +{\mathrm e}^{2 x} \]
✓ Solution by Mathematica
Time used: 0.016 (sec). Leaf size: 25
DSolve[y''[x]-y[x]==3*Exp[2*x],y[x],x,IncludeSingularSolutions -> True]
\[ y(x)\to e^{2 x}+c_1 e^x+c_2 e^{-x} \]