8.2 problem 1 (b)

8.2.1 Solving as second order linear constant coeff ode
8.2.2 Solving using Kovacic algorithm
8.2.3 Maple step by step solution

Internal problem ID [11713]
Internal file name [OUTPUT/11723_Thursday_April_11_2024_08_49_06_PM_48965104/index.tex]

Book: Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section: Chapter 4, Section 4.1. Basic theory of linear differential equations. Exercises page 113
Problem number: 1 (b).
ODE order: 2.
ODE degree: 1.

The type(s) of ODE detected by this program : "kovacic", "second_order_linear_constant_coeff"

Maple gives the following as the ode type

[[_2nd_order, _with_linear_symmetries]]

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

8.2.1 Solving as second order linear constant coeff ode

This is second order non-homogeneous ODE. In standard form the ODE is \[ A y''(x) + B y'(x) + C y(x) = f(x) \] Where \(A=1, B=5, C=6, f(x)={\mathrm e}^{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 non-homogeneous ODE \(A y''(x) + B y'(x) + C y(x) = f(x)\). \(y_h\) is the solution to \[ y^{\prime \prime }+5 y^{\prime }+6 y = 0 \] This is second order with constant coefficients homogeneous ODE. In standard form the ODE is \[ A y''(x) + B y'(x) + C y(x) = 0 \] Where in the above \(A=1, B=5, C=6\). Let the solution be \(y=e^{\lambda x}\). Substituting this into the ODE gives \[ \lambda ^{2} {\mathrm e}^{\lambda x}+5 \lambda \,{\mathrm e}^{\lambda x}+6 \,{\mathrm e}^{\lambda x} = 0 \tag {1} \] Since exponential function is never zero, then dividing Eq(2) throughout by \(e^{\lambda x}\) gives \[ \lambda ^{2}+5 \lambda +6 = 0 \tag {2} \] Equation (2) is the characteristic equation of the ODE. Its roots determine the general solution form.Using the quadratic formula \[ \lambda _{1,2} = \frac {-B}{2 A} \pm \frac {1}{2 A} \sqrt {B^2 - 4 A C} \] Substituting \(A=1, B=5, C=6\) into the above gives \begin {align*} \lambda _{1,2} &= \frac {-5}{(2) \left (1\right )} \pm \frac {1}{(2) \left (1\right )} \sqrt {5^2 - (4) \left (1\right )\left (6\right )}\\ &= -{\frac {5}{2}} \pm {\frac {1}{2}} \end {align*}

Hence \begin{align*} \lambda _1 &= -{\frac {5}{2}} + {\frac {1}{2}} \\ \lambda _2 &= -{\frac {5}{2}} - {\frac {1}{2}} \\ \end{align*} Which simplifies to \begin{align*} \lambda _1 &= -2 \\ \lambda _2 &= -3 \\ \end{align*} Since roots are real and distinct, then the solution is \begin{align*} y &= c_{1} e^{\lambda _1 x} + c_{2} e^{\lambda _2 x} \\ y &= c_{1} e^{\left (-2\right )x} +c_{2} e^{\left (-3\right )x} \\ \end{align*} Or \[ y =c_{1} {\mathrm e}^{-2 x}+c_{2} {\mathrm e}^{-3 x} \] Therefore the homogeneous solution \(y_h\) is \[ y_h = c_{1} {\mathrm e}^{-2 x}+c_{2} {\mathrm e}^{-3 x} \] The particular solution is now found using the method of undetermined coefficients. Looking at the RHS of the ode, which is \[ {\mathrm e}^{x} \] Shows that the corresponding undetermined set of the basis functions (UC_set) for the trial solution is \[ [\{{\mathrm e}^{x}\}] \] While the set of the basis functions for the homogeneous solution found earlier is \[ \{{\mathrm e}^{-3 x}, {\mathrm e}^{-2 x}\} \] Since there is no duplication between the basis function in the UC_set and the basis functions of the homogeneous solution, the trial solution is a linear combination of all the basis in the UC_set. \[ y_p = A_{1} {\mathrm e}^{x} \] The unknowns \(\{A_{1}\}\) are found by substituting the above trial solution \(y_p\) into the ODE and comparing coefficients. Substituting the trial solution into the ODE and simplifying gives \[ 12 A_{1} {\mathrm e}^{x} = {\mathrm e}^{x} \] Solving for the unknowns by comparing coefficients results in \[ \left [A_{1} = {\frac {1}{12}}\right ] \] Substituting the above back in the above trial solution \(y_p\), gives the particular solution \[ y_p = \frac {{\mathrm e}^{x}}{12} \] Therefore the general solution is \begin{align*} y &= y_h + y_p \\ &= \left (c_{1} {\mathrm e}^{-2 x}+c_{2} {\mathrm e}^{-3 x}\right ) + \left (\frac {{\mathrm e}^{x}}{12}\right ) \\ \end{align*} Initial conditions are used to solve for the constants of integration.

Looking at the above solution \begin {align*} y = c_{1} {\mathrm e}^{-2 x}+c_{2} {\mathrm e}^{-3 x}+\frac {{\mathrm e}^{x}}{12} \tag {1} \end {align*}

Initial conditions are now substituted in the above solution. This will generate the required equations to solve for the integration constants. substituting \(y = 5\) and \(x = 0\) in the above gives \begin {align*} 5 = c_{1} +c_{2} +\frac {1}{12}\tag {1A} \end {align*}

Taking derivative of the solution gives \begin {align*} y^{\prime } = -2 c_{1} {\mathrm e}^{-2 x}-3 c_{2} {\mathrm e}^{-3 x}+\frac {{\mathrm e}^{x}}{12} \end {align*}

substituting \(y^{\prime } = 7\) and \(x = 1\) in the above gives \begin {align*} 7 = \frac {\left ({\mathrm e}^{4}-24 c_{1} {\mathrm e}-36 c_{2} \right ) {\mathrm e}^{-3}}{12}\tag {2A} \end {align*}

Equations {1A,2A} are now solved for \(\{c_{1}, c_{2}\}\). Solving for the constants gives \begin {align*} c_{1}&=\frac {{\mathrm e}^{4}-84 \,{\mathrm e}^{3}-177}{24 \,{\mathrm e}-36}\\ c_{2}&=\frac {\left (-{\mathrm e}^{3}+84 \,{\mathrm e}^{2}+118\right ) {\mathrm e}}{24 \,{\mathrm e}-36} \end {align*}

Substituting these values back in above solution results in \begin {align*} y = \frac {-252 \,{\mathrm e}^{3-3 x}+171 \,{\mathrm e}^{-3 x +4}-2 \,{\mathrm e}^{5-3 x}-12 \,{\mathrm e}^{x +1}-354 \,{\mathrm e}^{-2 x +1}-354 \,{\mathrm e}^{-3 x +1}+236 \,{\mathrm e}^{2-3 x}+4 \,{\mathrm e}^{x +2}+2 \,{\mathrm e}^{-2 x +5}-171 \,{\mathrm e}^{4-2 x}+9 \,{\mathrm e}^{x}+531 \,{\mathrm e}^{-2 x}+252 \,{\mathrm e}^{-2 x +3}}{48 \,{\mathrm e}^{2}-144 \,{\mathrm e}+108} \end {align*}

Which simplifies to \[ y = -\frac {\left (9 \,{\mathrm e}^{3 x}-354 \,{\mathrm e}^{1-x}-12 \,{\mathrm e}^{3 x +1}-171 \,{\mathrm e}^{4}+252 \,{\mathrm e}^{3}-252 \,{\mathrm e}^{-x +3}+171 \,{\mathrm e}^{-x +4}-2 \,{\mathrm e}^{-x +5}-354 \,{\mathrm e}+236 \,{\mathrm e}^{-x +2}+4 \,{\mathrm e}^{3 x +2}+2 \,{\mathrm e}^{5}+531\right ) {\mathrm e}^{-2 x}}{-48 \,{\mathrm e}^{2}+144 \,{\mathrm e}-108} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= -\frac {\left (9 \,{\mathrm e}^{3 x}-354 \,{\mathrm e}^{1-x}-12 \,{\mathrm e}^{3 x +1}-171 \,{\mathrm e}^{4}+252 \,{\mathrm e}^{3}-252 \,{\mathrm e}^{-x +3}+171 \,{\mathrm e}^{-x +4}-2 \,{\mathrm e}^{-x +5}-354 \,{\mathrm e}+236 \,{\mathrm e}^{-x +2}+4 \,{\mathrm e}^{3 x +2}+2 \,{\mathrm e}^{5}+531\right ) {\mathrm e}^{-2 x}}{-48 \,{\mathrm e}^{2}+144 \,{\mathrm e}-108} \\ \end{align*}

Figure 250: Solution plot

Verification of solutions

\[ y = -\frac {\left (9 \,{\mathrm e}^{3 x}-354 \,{\mathrm e}^{1-x}-12 \,{\mathrm e}^{3 x +1}-171 \,{\mathrm e}^{4}+252 \,{\mathrm e}^{3}-252 \,{\mathrm e}^{-x +3}+171 \,{\mathrm e}^{-x +4}-2 \,{\mathrm e}^{-x +5}-354 \,{\mathrm e}+236 \,{\mathrm e}^{-x +2}+4 \,{\mathrm e}^{3 x +2}+2 \,{\mathrm e}^{5}+531\right ) {\mathrm e}^{-2 x}}{-48 \,{\mathrm e}^{2}+144 \,{\mathrm e}-108} \] Verified OK.

8.2.2 Solving using Kovacic algorithm

Writing the ode as \begin {align*} y^{\prime \prime }+5 y^{\prime }+6 y &= 0 \tag {1} \\ A y^{\prime \prime } + B y^{\prime } + C y &= 0 \tag {2} \end {align*}

Comparing (1) and (2) shows that \begin {align*} A &= 1 \\ B &= 5\tag {3} \\ C &= 6 \end {align*}

Applying the Liouville transformation on the dependent variable gives \begin {align*} z(x) &= y e^{\int \frac {B}{2 A} \,dx} \end {align*}

Then (2) becomes \begin {align*} z''(x) = r z(x)\tag {4} \end {align*}

Where \(r\) is given by \begin {align*} r &= \frac {s}{t}\tag {5} \\ &= \frac {2 A B' - 2 B A' + B^2 - 4 A C}{4 A^2} \end {align*}

Substituting the values of \(A,B,C\) from (3) in the above and simplifying gives \begin {align*} r &= \frac {1}{4}\tag {6} \end {align*}

Comparing the above to (5) shows that \begin {align*} s &= 1\\ t &= 4 \end {align*}

Therefore eq. (4) becomes \begin {align*} z''(x) &= \frac {z \left (x \right )}{4} \tag {7} \end {align*}

Equation (7) is now solved. After finding \(z(x)\) then \(y\) is found using the inverse transformation \begin {align*} y &= z \left (x \right ) e^{-\int \frac {B}{2 A} \,dx} \end {align*}

The first step is to determine the case of Kovacic algorithm this ode belongs to. There are 3 cases depending on the order of poles of \(r\) and the order of \(r\) at \(\infty \). The following table summarizes these cases.

Case

Allowed pole order for \(r\)

Allowed value for \(\mathcal {O}(\infty )\)

1

\(\left \{ 0,1,2,4,6,8,\cdots \right \} \)

\(\left \{ \cdots ,-6,-4,-2,0,2,3,4,5,6,\cdots \right \} \)

2

Need to have at least one pole that is either order \(2\) or odd order greater than \(2\). Any other pole order is allowed as long as the above condition is satisfied. Hence the following set of pole orders are all allowed. \(\{1,2\}\),\(\{1,3\}\),\(\{2\}\),\(\{3\}\),\(\{3,4\}\),\(\{1,2,5\}\).

no condition

3

\(\left \{ 1,2\right \} \)

\(\left \{ 2,3,4,5,6,7,\cdots \right \} \)

Table 158: Necessary conditions for each Kovacic case

The order of \(r\) at \(\infty \) is the degree of \(t\) minus the degree of \(s\). Therefore \begin {align*} O\left (\infty \right ) &= \text {deg}(t) - \text {deg}(s) \\ &= 0 - 0 \\ &= 0 \end {align*}

There are no poles in \(r\). Therefore the set of poles \(\Gamma \) is empty. Since there is no odd order pole larger than \(2\) and the order at \(\infty \) is \(0\) then the necessary conditions for case one are met. Therefore \begin {align*} L &= [1] \end {align*}

Since \(r = {\frac {1}{4}}\) is not a function of \(x\), then there is no need run Kovacic algorithm to obtain a solution for transformed ode \(z''=r z\) as one solution is \[ z_1(x) = {\mathrm e}^{-\frac {x}{2}} \] Using the above, the solution for the original ode can now be found. The first solution to the original ode in \(y\) is found from \begin{align*} y_1 &= z_1 e^{ \int -\frac {1}{2} \frac {B}{A} \,dx} \\ &= z_1 e^{ -\int \frac {1}{2} \frac {5}{1} \,dx} \\ &= z_1 e^{-\frac {5 x}{2}} \\ &= z_1 \left ({\mathrm e}^{-\frac {5 x}{2}}\right ) \\ \end{align*} Which simplifies to \[ y_1 = {\mathrm e}^{-3 x} \] The second solution \(y_2\) to the original ode is found using reduction of order \[ y_2 = y_1 \int \frac { e^{\int -\frac {B}{A} \,dx}}{y_1^2} \,dx \] Substituting gives \begin{align*} y_2 &= y_1 \int \frac { e^{\int -\frac {5}{1} \,dx}}{\left (y_1\right )^2} \,dx \\ &= y_1 \int \frac { e^{-5 x}}{\left (y_1\right )^2} \,dx \\ &= y_1 \left ({\mathrm e}^{x}\right ) \\ \end{align*} Therefore the solution is

\begin{align*} y &= c_{1} y_1 + c_{2} y_2 \\ &= c_{1} \left ({\mathrm e}^{-3 x}\right ) + c_{2} \left ({\mathrm e}^{-3 x}\left ({\mathrm e}^{x}\right )\right ) \\ \end{align*} This is second order nonhomogeneous ODE. 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 nonhomogeneous ODE \(A y''(x) + B y'(x) + C y(x) = f(x)\). \(y_h\) is the solution to \[ y^{\prime \prime }+5 y^{\prime }+6 y = 0 \] The homogeneous solution is found using the Kovacic algorithm which results in \[ y_h = c_{1} {\mathrm e}^{-3 x}+c_{2} {\mathrm e}^{-2 x} \] The particular solution is now found using the method of undetermined coefficients. Looking at the RHS of the ode, which is \[ {\mathrm e}^{x} \] Shows that the corresponding undetermined set of the basis functions (UC_set) for the trial solution is \[ [\{{\mathrm e}^{x}\}] \] While the set of the basis functions for the homogeneous solution found earlier is \[ \{{\mathrm e}^{-3 x}, {\mathrm e}^{-2 x}\} \] Since there is no duplication between the basis function in the UC_set and the basis functions of the homogeneous solution, the trial solution is a linear combination of all the basis in the UC_set. \[ y_p = A_{1} {\mathrm e}^{x} \] The unknowns \(\{A_{1}\}\) are found by substituting the above trial solution \(y_p\) into the ODE and comparing coefficients. Substituting the trial solution into the ODE and simplifying gives \[ 12 A_{1} {\mathrm e}^{x} = {\mathrm e}^{x} \] Solving for the unknowns by comparing coefficients results in \[ \left [A_{1} = {\frac {1}{12}}\right ] \] Substituting the above back in the above trial solution \(y_p\), gives the particular solution \[ y_p = \frac {{\mathrm e}^{x}}{12} \] Therefore the general solution is \begin{align*} y &= y_h + y_p \\ &= \left (c_{1} {\mathrm e}^{-3 x}+c_{2} {\mathrm e}^{-2 x}\right ) + \left (\frac {{\mathrm e}^{x}}{12}\right ) \\ \end{align*} Initial conditions are used to solve for the constants of integration.

Looking at the above solution \begin {align*} y = c_{1} {\mathrm e}^{-3 x}+c_{2} {\mathrm e}^{-2 x}+\frac {{\mathrm e}^{x}}{12} \tag {1} \end {align*}

Initial conditions are now substituted in the above solution. This will generate the required equations to solve for the integration constants. substituting \(y = 5\) and \(x = 0\) in the above gives \begin {align*} 5 = c_{1} +c_{2} +\frac {1}{12}\tag {1A} \end {align*}

Taking derivative of the solution gives \begin {align*} y^{\prime } = -3 c_{1} {\mathrm e}^{-3 x}-2 c_{2} {\mathrm e}^{-2 x}+\frac {{\mathrm e}^{x}}{12} \end {align*}

substituting \(y^{\prime } = 7\) and \(x = 1\) in the above gives \begin {align*} 7 = \frac {\left ({\mathrm e}^{4}-24 c_{2} {\mathrm e}-36 c_{1} \right ) {\mathrm e}^{-3}}{12}\tag {2A} \end {align*}

Equations {1A,2A} are now solved for \(\{c_{1}, c_{2}\}\). Solving for the constants gives \begin {align*} c_{1}&=\frac {\left (-{\mathrm e}^{3}+84 \,{\mathrm e}^{2}+118\right ) {\mathrm e}}{24 \,{\mathrm e}-36}\\ c_{2}&=\frac {{\mathrm e}^{4}-84 \,{\mathrm e}^{3}-177}{24 \,{\mathrm e}-36} \end {align*}

Substituting these values back in above solution results in \begin {align*} y = \frac {-252 \,{\mathrm e}^{3-3 x}+171 \,{\mathrm e}^{-3 x +4}-2 \,{\mathrm e}^{5-3 x}-12 \,{\mathrm e}^{x +1}-354 \,{\mathrm e}^{-2 x +1}-354 \,{\mathrm e}^{-3 x +1}+236 \,{\mathrm e}^{2-3 x}+4 \,{\mathrm e}^{x +2}+2 \,{\mathrm e}^{-2 x +5}-171 \,{\mathrm e}^{4-2 x}+9 \,{\mathrm e}^{x}+531 \,{\mathrm e}^{-2 x}+252 \,{\mathrm e}^{-2 x +3}}{48 \,{\mathrm e}^{2}-144 \,{\mathrm e}+108} \end {align*}

Which simplifies to \[ y = -\frac {\left (9 \,{\mathrm e}^{3 x}-354 \,{\mathrm e}^{1-x}-12 \,{\mathrm e}^{3 x +1}-171 \,{\mathrm e}^{4}+252 \,{\mathrm e}^{3}-252 \,{\mathrm e}^{-x +3}+171 \,{\mathrm e}^{-x +4}-2 \,{\mathrm e}^{-x +5}-354 \,{\mathrm e}+236 \,{\mathrm e}^{-x +2}+4 \,{\mathrm e}^{3 x +2}+2 \,{\mathrm e}^{5}+531\right ) {\mathrm e}^{-2 x}}{-48 \,{\mathrm e}^{2}+144 \,{\mathrm e}-108} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= -\frac {\left (9 \,{\mathrm e}^{3 x}-354 \,{\mathrm e}^{1-x}-12 \,{\mathrm e}^{3 x +1}-171 \,{\mathrm e}^{4}+252 \,{\mathrm e}^{3}-252 \,{\mathrm e}^{-x +3}+171 \,{\mathrm e}^{-x +4}-2 \,{\mathrm e}^{-x +5}-354 \,{\mathrm e}+236 \,{\mathrm e}^{-x +2}+4 \,{\mathrm e}^{3 x +2}+2 \,{\mathrm e}^{5}+531\right ) {\mathrm e}^{-2 x}}{-48 \,{\mathrm e}^{2}+144 \,{\mathrm e}-108} \\ \end{align*}

Figure 251: Solution plot

Verification of solutions

\[ y = -\frac {\left (9 \,{\mathrm e}^{3 x}-354 \,{\mathrm e}^{1-x}-12 \,{\mathrm e}^{3 x +1}-171 \,{\mathrm e}^{4}+252 \,{\mathrm e}^{3}-252 \,{\mathrm e}^{-x +3}+171 \,{\mathrm e}^{-x +4}-2 \,{\mathrm e}^{-x +5}-354 \,{\mathrm e}+236 \,{\mathrm e}^{-x +2}+4 \,{\mathrm e}^{3 x +2}+2 \,{\mathrm e}^{5}+531\right ) {\mathrm e}^{-2 x}}{-48 \,{\mathrm e}^{2}+144 \,{\mathrm e}-108} \] Verified OK.

8.2.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [\frac {d}{d x}y^{\prime }+5 y^{\prime }+6 y={\mathrm e}^{x}, y \left (0\right )=5, y^{\prime }{\raise{-0.36em}{\Big |}}{\mstack {}{_{\left \{x \hiderel {=}1\right \}}}}=7\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & \frac {d}{d x}y^{\prime } \\ \bullet & {} & \textrm {Characteristic polynomial of homogeneous ODE}\hspace {3pt} \\ {} & {} & r^{2}+5 r +6=0 \\ \bullet & {} & \textrm {Factor the characteristic polynomial}\hspace {3pt} \\ {} & {} & \left (r +3\right ) \left (r +2\right )=0 \\ \bullet & {} & \textrm {Roots of the characteristic polynomial}\hspace {3pt} \\ {} & {} & r =\left (-3, -2\right ) \\ \bullet & {} & \textrm {1st solution of the homogeneous ODE}\hspace {3pt} \\ {} & {} & y_{1}\left (x \right )={\mathrm e}^{-3 x} \\ \bullet & {} & \textrm {2nd solution of the homogeneous ODE}\hspace {3pt} \\ {} & {} & y_{2}\left (x \right )={\mathrm e}^{-2 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}^{-3 x}+c_{2} {\mathrm e}^{-2 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 )={\mathrm e}^{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}^{-3 x} & {\mathrm e}^{-2 x} \\ -3 \,{\mathrm e}^{-3 x} & -2 \,{\mathrm e}^{-2 x} \end {array}\right ] \\ {} & \circ & \textrm {Compute Wronskian}\hspace {3pt} \\ {} & {} & W \left (y_{1}\left (x \right ), y_{2}\left (x \right )\right )={\mathrm e}^{-5 x} \\ {} & \circ & \textrm {Substitute functions into equation for}\hspace {3pt} y_{p}\left (x \right ) \\ {} & {} & y_{p}\left (x \right )=-{\mathrm e}^{-3 x} \left (\int {\mathrm e}^{4 x}d x \right )+{\mathrm e}^{-2 x} \left (\int {\mathrm e}^{3 x}d x \right ) \\ {} & \circ & \textrm {Compute integrals}\hspace {3pt} \\ {} & {} & y_{p}\left (x \right )=\frac {{\mathrm e}^{x}}{12} \\ \bullet & {} & \textrm {Substitute particular solution into general solution to ODE}\hspace {3pt} \\ {} & {} & y=c_{1} {\mathrm e}^{-3 x}+c_{2} {\mathrm e}^{-2 x}+\frac {{\mathrm e}^{x}}{12} \\ \square & {} & \textrm {Check validity of solution}\hspace {3pt} y=c_{1} {\mathrm e}^{-3 x}+c_{2} {\mathrm e}^{-2 x}+\frac {{\mathrm e}^{x}}{12} \\ {} & \circ & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=5 \\ {} & {} & 5=c_{1} +c_{2} +\frac {1}{12} \\ {} & \circ & \textrm {Compute derivative of the solution}\hspace {3pt} \\ {} & {} & y^{\prime }=-3 c_{1} {\mathrm e}^{-3 x}-2 c_{2} {\mathrm e}^{-2 x}+\frac {{\mathrm e}^{x}}{12} \\ {} & \circ & \textrm {Use the initial condition}\hspace {3pt} y^{\prime }{\raise{-0.36em}{\Big |}}{\mstack {}{_{\left \{x \hiderel {=}1\right \}}}}=7 \\ {} & {} & 7=-3 c_{1} {\mathrm e}^{-3}-2 c_{2} {\mathrm e}^{-2}+\frac {{\mathrm e}}{12} \\ {} & \circ & \textrm {Solve for}\hspace {3pt} c_{1} \hspace {3pt}\textrm {and}\hspace {3pt} c_{2} \\ {} & {} & \left \{c_{1} =\frac {118 \,{\mathrm e}^{-2}-{\mathrm e}+84}{12 \left (2 \,{\mathrm e}^{-2}-3 \,{\mathrm e}^{-3}\right )}, c_{2} =-\frac {-{\mathrm e}+177 \,{\mathrm e}^{-3}+84}{12 \left (2 \,{\mathrm e}^{-2}-3 \,{\mathrm e}^{-3}\right )}\right \} \\ {} & \circ & \textrm {Substitute constant values into general solution and simplify}\hspace {3pt} \\ {} & {} & y=\frac {\left ({\mathrm e}^{x +4}+2 \,{\mathrm e}^{1+4 x}-{\mathrm e}^{4}-84 \,{\mathrm e}^{3+x}-3 \,{\mathrm e}^{4 x}+84 \,{\mathrm e}^{3}+118 \,{\mathrm e}-177 \,{\mathrm e}^{x}\right ) {\mathrm e}^{-3 x}}{24 \,{\mathrm e}-36} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y=\frac {\left ({\mathrm e}^{x +4}+2 \,{\mathrm e}^{1+4 x}-{\mathrm e}^{4}-84 \,{\mathrm e}^{3+x}-3 \,{\mathrm e}^{4 x}+84 \,{\mathrm e}^{3}+118 \,{\mathrm e}-177 \,{\mathrm e}^{x}\right ) {\mathrm e}^{-3 x}}{24 \,{\mathrm e}-36} \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.125 (sec). Leaf size: 55

dsolve([diff(y(x),x$2)+5*diff(y(x),x)+6*y(x)=exp(x),y(0) = 5, D(y)(1) = 7],y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {\left (-{\mathrm e}^{4-x}+84 \,{\mathrm e}^{3-x}+{\mathrm e}^{4}+2 \,{\mathrm e}^{3 x +1}-84 \,{\mathrm e}^{3}+118 \,{\mathrm e}^{1-x}-3 \,{\mathrm e}^{3 x}-177\right ) {\mathrm e}^{-2 x}}{24 \,{\mathrm e}-36} \]

Solution by Mathematica

Time used: 0.022 (sec). Leaf size: 68

DSolve[{y''[x]+5*y'[x]+6*y[x]==Exp[x],{y[0]==5,y'[1]==7}},y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to \frac {e^{-3 x} \left (-177 e^x-3 e^{4 x}-84 e^{x+3}+e^{x+4}+2 e^{4 x+1}+118 e+84 e^3-e^4\right )}{12 (2 e-3)} \]