8.29 problem 44

8.29.1 Solving as second order change of variable on x method 2 ode
8.29.2 Solving as second order change of variable on x method 1 ode

Internal problem ID [651]
Internal file name [OUTPUT/651_Sunday_June_05_2022_01_46_25_AM_16115400/index.tex]

Book: Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section: Chapter 3, Second order linear equations, 3.3 Complex Roots of the Characteristic Equation , page 164
Problem number: 44.
ODE order: 2.
ODE degree: 1.

The type(s) of ODE detected by this program : "second_order_change_of_variable_on_x_method_1", "second_order_change_of_variable_on_x_method_2"

Maple gives the following as the ode type

[[_2nd_order, _with_linear_symmetries], [_2nd_order, _linear, `_with_symmetry_[0,F(x)]`]]

\[ \boxed {y^{\prime \prime }+t y^{\prime }+{\mathrm e}^{-t^{2}} y=0} \]

8.29.1 Solving as second order change of variable on x method 2 ode

In normal form the ode \begin {align*} y^{\prime \prime }+t y^{\prime }+{\mathrm e}^{-t^{2}} y&=0 \tag {1} \end {align*}

Becomes \begin {align*} y^{\prime \prime }+p \left (t \right ) y^{\prime }+q \left (t \right ) y&=0 \tag {2} \end {align*}

Where \begin {align*} p \left (t \right )&=t\\ q \left (t \right )&={\mathrm e}^{-t^{2}} \end {align*}

Applying change of variables \(\tau = g \left (t \right )\) to (2) gives \begin {align*} \frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )+p_{1} \left (\frac {d}{d \tau }y \left (\tau \right )\right )+q_{1} y \left (\tau \right )&=0 \tag {3} \end {align*}

Where \(\tau \) is the new independent variable, and \begin {align*} p_{1} \left (\tau \right ) &=\frac {\tau ^{\prime \prime }\left (t \right )+p \left (t \right ) \tau ^{\prime }\left (t \right )}{{\tau ^{\prime }\left (t \right )}^{2}}\tag {4} \\ q_{1} \left (\tau \right ) &=\frac {q \left (t \right )}{{\tau ^{\prime }\left (t \right )}^{2}}\tag {5} \end {align*}

Let \(p_{1} = 0\). Eq (4) simplifies to \begin {align*} \tau ^{\prime \prime }\left (t \right )+p \left (t \right ) \tau ^{\prime }\left (t \right )&=0 \end {align*}

This ode is solved resulting in \begin {align*} \tau &= \int {\mathrm e}^{-\left (\int p \left (t \right )d t \right )}d t\\ &= \int {\mathrm e}^{-\left (\int t d t \right )}d t\\ &= \int e^{-\frac {t^{2}}{2}} \,dt\\ &= \int {\mathrm e}^{-\frac {t^{2}}{2}}d t\\ &= \frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2}\tag {6} \end {align*}

Using (6) to evaluate \(q_{1}\) from (5) gives \begin {align*} q_{1} \left (\tau \right ) &= \frac {q \left (t \right )}{{\tau ^{\prime }\left (t \right )}^{2}}\\ &= \frac {{\mathrm e}^{-t^{2}}}{{\mathrm e}^{-t^{2}}}\\ &= 1\tag {7} \end {align*}

Substituting the above in (3) and noting that now \(p_{1} = 0\) results in \begin {align*} \frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )+q_{1} y \left (\tau \right )&=0 \\ \frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )+y \left (\tau \right )&=0 \end {align*}

The above ode is now solved for \(y \left (\tau \right )\).This is second order with constant coefficients homogeneous ODE. In standard form the ODE is \[ A y''(\tau ) + B y'(\tau ) + C y(\tau ) = 0 \] Where in the above \(A=1, B=0, C=1\). Let the solution be \(y \left (\tau \right )=e^{\lambda \tau }\). Substituting this into the ODE gives \[ \lambda ^{2} {\mathrm e}^{\lambda \tau }+{\mathrm e}^{\lambda \tau } = 0 \tag {1} \] Since exponential function is never zero, then dividing Eq(2) throughout by \(e^{\lambda \tau }\) gives \[ \lambda ^{2}+1 = 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=0, C=1\) into the above gives \begin {align*} \lambda _{1,2} &= \frac {0}{(2) \left (1\right )} \pm \frac {1}{(2) \left (1\right )} \sqrt {0^2 - (4) \left (1\right )\left (1\right )}\\ &= \pm i \end {align*}

Hence \begin {align*} \lambda _1 &= + i\\ \lambda _2 &= - i \end {align*}

Which simplifies to \begin{align*} \lambda _1 &= i \\ \lambda _2 &= -i \\ \end{align*} Since roots are complex conjugate of each others, then let the roots be \[ \lambda _{1,2} = \alpha \pm i \beta \] Where \(\alpha =0\) and \(\beta =1\). Therefore the final solution, when using Euler relation, can be written as \[ y \left (\tau \right ) = e^{\alpha \tau } \left ( c_{1} \cos (\beta \tau ) + c_{2} \sin (\beta \tau ) \right ) \] Which becomes \[ y \left (\tau \right ) = e^{0}\left (c_{1} \cos \left (\tau \right )+c_{2} \sin \left (\tau \right )\right ) \] Or \[ y \left (\tau \right ) = c_{1} \cos \left (\tau \right )+c_{2} \sin \left (\tau \right ) \] The above solution is now transformed back to \(y\) using (6) which results in \begin {align*} y &= c_{1} \cos \left (\frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2}\right )+c_{2} \sin \left (\frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2}\right ) \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= c_{1} \cos \left (\frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2}\right )+c_{2} \sin \left (\frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2}\right ) \\ \end{align*}

Verification of solutions

\[ y = c_{1} \cos \left (\frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2}\right )+c_{2} \sin \left (\frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2}\right ) \] Verified OK.

8.29.2 Solving as second order change of variable on x method 1 ode

In normal form the ode \begin {align*} y^{\prime \prime }+t y^{\prime }+{\mathrm e}^{-t^{2}} y&=0 \tag {1} \end {align*}

Becomes \begin {align*} y^{\prime \prime }+p \left (t \right ) y^{\prime }+q \left (t \right ) y&=0 \tag {2} \end {align*}

Where \begin {align*} p \left (t \right )&=t\\ q \left (t \right )&={\mathrm e}^{-t^{2}} \end {align*}

Applying change of variables \(\tau = g \left (t \right )\) to (2) results \begin {align*} \frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )+p_{1} \left (\frac {d}{d \tau }y \left (\tau \right )\right )+q_{1} y \left (\tau \right )&=0 \tag {3} \end {align*}

Where \(\tau \) is the new independent variable, and \begin {align*} p_{1} \left (\tau \right ) &=\frac {\tau ^{\prime \prime }\left (t \right )+p \left (t \right ) \tau ^{\prime }\left (t \right )}{{\tau ^{\prime }\left (t \right )}^{2}}\tag {4} \\ q_{1} \left (\tau \right ) &=\frac {q \left (t \right )}{{\tau ^{\prime }\left (t \right )}^{2}}\tag {5} \end {align*}

Let \(q_1=c^2\) where \(c\) is some constant. Therefore from (5) \begin {align*} \tau ' &= \frac {1}{c}\sqrt {q}\\ &= \frac {\sqrt {{\mathrm e}^{-t^{2}}}}{c}\tag {6} \\ \tau '' &= -\frac {\sqrt {{\mathrm e}^{-t^{2}}}\, t}{c} \end {align*}

Substituting the above into (4) results in \begin {align*} p_{1} \left (\tau \right ) &=\frac {\tau ^{\prime \prime }\left (t \right )+p \left (t \right ) \tau ^{\prime }\left (t \right )}{{\tau ^{\prime }\left (t \right )}^{2}}\\ &=\frac {-\frac {\sqrt {{\mathrm e}^{-t^{2}}}\, t}{c}+t\frac {\sqrt {{\mathrm e}^{-t^{2}}}}{c}}{\left (\frac {\sqrt {{\mathrm e}^{-t^{2}}}}{c}\right )^2} \\ &=0 \end {align*}

Therefore ode (3) now becomes \begin {align*} y \left (\tau \right )'' + p_1 y \left (\tau \right )' + q_1 y \left (\tau \right ) &= 0 \\ \frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )+c^{2} y \left (\tau \right ) &= 0 \tag {7} \end {align*}

The above ode is now solved for \(y \left (\tau \right )\). Since the ode is now constant coefficients, it can be easily solved to give \begin {align*} y \left (\tau \right ) &= c_{1} \cos \left (c \tau \right )+c_{2} \sin \left (c \tau \right ) \end {align*}

Now from (6) \begin {align*} \tau &= \int \frac {1}{c} \sqrt q \,dt \\ &= \frac {\int \sqrt {{\mathrm e}^{-t^{2}}}d t}{c}\\ &= \frac {\sqrt {{\mathrm e}^{-t^{2}}}\, {\mathrm e}^{\frac {t^{2}}{2}} \sqrt {2}\, \sqrt {\pi }\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2 c} \end {align*}

Substituting the above into the solution obtained gives \[ y = c_{1} \cos \left (\frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2}\right )+c_{2} \sin \left (\frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2}\right ) \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= c_{1} \cos \left (\frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2}\right )+c_{2} \sin \left (\frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2}\right ) \\ \end{align*}

Verification of solutions

\[ y = c_{1} \cos \left (\frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2}\right )+c_{2} \sin \left (\frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, t}{2}\right )}{2}\right ) \] Verified OK.

Maple trace

`Methods for second order ODEs: 
--- Trying classification methods --- 
trying a symmetry of the form [xi=0, eta=F(x)] 
<- linear_1 successful`
 

Solution by Maple

Time used: 0.0 (sec). Leaf size: 55

dsolve(diff(y(t),t$2)+ t*diff(y(t),t)+exp(-t^2)*y(t) = 0,y(t), singsol=all)
 

\[ y \left (t \right ) = c_{1} \operatorname {csgn}\left ({\mathrm e}^{\frac {t^{2}}{2}}\right ) \sin \left (\frac {\sqrt {2}\, \sqrt {\pi }\, \operatorname {erf}\left (\frac {t \sqrt {2}}{2}\right )}{2}\right )+c_{2} \cos \left (\frac {\sqrt {2}\, \operatorname {csgn}\left ({\mathrm e}^{\frac {t^{2}}{2}}\right ) \sqrt {\pi }\, \operatorname {erf}\left (\frac {t \sqrt {2}}{2}\right )}{2}\right ) \]

Solution by Mathematica

Time used: 0.059 (sec). Leaf size: 102

DSolve[y''[t]+t*y'[t]+exp(-t^2)*y[t]==0,y[t],t,IncludeSingularSolutions -> True]
 

\[ y(t)\to e^{-\frac {1}{4} \left (\sqrt {4 \exp +1}+1\right ) t^2} \left (c_1 \operatorname {HermiteH}\left (-\frac {1}{2}-\frac {1}{2 \sqrt {4 \exp +1}},\frac {\sqrt [4]{4 \exp +1} t}{\sqrt {2}}\right )+c_2 \operatorname {Hypergeometric1F1}\left (\frac {1}{4} \left (1+\frac {1}{\sqrt {4 \exp +1}}\right ),\frac {1}{2},\frac {1}{2} \sqrt {4 \exp +1} t^2\right )\right ) \]