2.2.3 Linear ode

2.2.3.1 Example 1
2.2.3.2 Example 2
2.2.3.3 Example 3
2.2.3.4 Example 4

\[ y^{\prime }+p\left ( x\right ) y=q\left ( x\right ) \]

ode internal name "linear"

Solved by finding integration factor \(\mu =e^{\int p\left ( x\right ) dx}\). The ode then becomes \(\frac {d}{dx}\left ( \mu y\right ) =\mu q\). Integrating gives \(\mu y=\int \mu qdx+c\) or \begin {align*} y & =\left ( \int \mu qdx+c\right ) \frac {1}{\mu }\\ & =\left ( \int q\left ( x\right ) e^{\int p\left ( x\right ) dx}dx+c\right ) e^{\int -p\left ( x\right ) dx} \end {align*}

If \(\mu \) can not be evaluated explicitly and initial conditions are given as \(y\left ( x_{0}\right ) =y_{0}\) then the integration factor is written as\[ \mu =e^{\int _{x0}^{x}p\left ( \tau \right ) d\tau }\] And the solution become\[ y=\left ( \int q\left ( \tau \right ) e^{\int _{x_{0}}^{\tau }p\left ( \tau \right ) d\tau }d\tau +y_{0}\right ) e^{\int _{x0}^{x}-p\left ( \tau \right ) d\tau }\] For an example, if the ode was \(y^{\prime }+p\left ( x\right ) y=\sin \left ( x\right ) \) with IC \(y\left ( x_{0}\right ) =y_{0}\) then the solution is\[ y=\left ( \int \sin \left ( \tau \right ) e^{\int _{x_{0}}^{\tau }p\left ( \tau \right ) d\tau }d\tau +y_{0}\right ) e^{\int _{x0}^{x}-p\left ( \tau \right ) d\tau }\] On the other hand, If \(\mu \) can be evaluated explicitly (i.e. the integration can be done) but \(\int \mu qdx\) can not (may be because \(q\left ( x\right ) \) is too complicated or given as unknown function, with IC \(y\left ( x_{0}\right ) =y_{0}\) then the solution is\[ y=\left ( \int _{x_{0}}^{x}q\left ( \tau \right ) \mu \left ( \tau \right ) d\tau +y_{0}\mu \left ( x_{0}\right ) \right ) \frac {1}{\mu \left ( x\right ) }\] For an example, given ode \(y^{\prime }+\sin \left ( x\right ) y=q\left ( x\right ) \) with IC \(y\left ( x_{0}\right ) =y_{0}\) then the solution is\[ y=\left ( \int _{x_{0}}^{x}q\left ( \tau \right ) e^{-\cos \left ( \tau \right ) }d\tau +y_{0}e^{-\cos \left ( x_{0}\right ) }\right ) \frac {1}{e^{-\cos \left ( x\right ) }}\]