3.2.2 Quadrature ode

Example 1
Example 2
Example 3
Example 4
Example 5
Example 6
Example 7
Example 8
Example 9
Example 10
Example 11
Example 12

\begin {align*} y^{\prime } & =f\left ( x\right ) \\ y^{\prime } & =f\left ( y\right ) \end {align*}

The following flow chart gives the algorithm for solving quadrature ode.

ode internal name "quadrature"

Solved by direct integration. There are two forms. They are

\begin {align*} y^{\prime } & =f\left ( x\right ) \\ y^{\prime } & =f\left ( y\right ) \end {align*}

For first form, the solution is \[ y=\int f\left ( x\right ) dx+c \] For the second form the solution is \begin {align*} \int \frac {dy}{f\left ( y\right ) } & =\int dx\qquad f\left ( y\right ) \neq 0\\ \int \frac {dy}{f\left ( y\right ) } & =x+c \end {align*}

These two forms are special cases of separable first order ode \(y^{\prime }=f\left ( x\right ) g\left ( y\right ) .\)

For the form \(y^{\prime }=f\left ( y\right ) \) and if IC are given, we should always check if IC satisfies the ODE itself first. If so, then the solution is simply \(y=y_{0}\). i.e. there is no need to integrate and solve for constant of integration and any of this. This only works for \(y^{\prime }=f\left ( y\right ) \) form. Not for \(y^{\prime }=f\left ( x\right ) \).

Given an ode \(y^{\prime }=f\left ( x\right ) \) and if it is not possible to integrate \(\int f\left ( x\right ) dx\), then the final solution should be left as \[ y\left ( x\right ) =\int f\left ( x\right ) dx+c_{1}\] If initial conditions are given as \(y\left ( x_{0}\right ) =y_{0}\) then the above is adjusted to become\[ y\left ( x\right ) =\int _{a}^{x}f\left ( \tau \right ) d\tau +b \] This is only when the integration of \(f\left ( x\right ) \) can not be computed. On the other hand, if the ode is \(y^{\prime }=g\left ( y\right ) \) and it is also not possible to integrate \(\int \frac {1}{g\left ( y\right ) }\) then the final answer now becomes\[ \int ^{y\left ( x\right ) }\frac {1}{g\left ( \tau \right ) }d\tau =x+c_{1}\] If initial conditions are given as \(y\left ( x_{0}\right ) =y_{0}\) then the above is adjusted to become\[ \int _{0}^{y\left ( x\right ) }\frac {1}{g\left ( \tau \right ) }d\tau +\int _{0}^{y_{0}}\frac {1}{g\left ( \tau \right ) }d\tau =x-x_{0}\] For the case where it is not possible to solve for \(y^{\prime }\) explicitly, then \(\operatorname {RootOf}\) is used. For example, given \[ \sin \left ( y^{\prime }\right ) +y^{\prime }=x \] This is quadrature, since it has only \(y^{\prime }\) and \(x\). But it is not possible to isolate \(y^{\prime }\). The solution will be in terms of \(\operatorname {RootOf}\) given by

\[ y^{\prime }=\operatorname {RootOf}\left ( \sin \left ( \_Z\right ) +\_Z-x\right ) \] We now still continue as before and integrate both sides which results in\[ y\left ( x\right ) =\int \operatorname {RootOf}\left ( \sin \left ( \_Z\right ) +\_Z-x\right ) dx+c \] If initial conditions are given as \(y\left ( x_{0}\right ) =y_{0}\) the above is modified to become\[ y\left ( x\right ) -y_{0}=\int _{x_{0}}^{x}\operatorname {RootOf}\left ( \sin \left ( \_Z\right ) +\_Z-\tau \right ) d\tau \] What happens if the ode had a missing \(x\) instead? For an example \[ \sin \left ( y^{\prime }\right ) +y^{\prime }=y \] Now solving for \(y^{\prime }\) gives\[ y^{\prime }=\operatorname {RootOf}\left ( \sin \left ( \_Z\right ) +\_Z-y\right ) \] Integrating as before results in\begin {align*} \frac {dy}{\operatorname {RootOf}\left ( \sin \left ( \_Z\right ) +\_Z-y\right ) } & =dx\\ \int \frac {dy}{\operatorname {RootOf}\left ( \sin \left ( \_Z\right ) +\_Z-y\right ) } & =\int dx\\ \int _{0}^{y\left ( x\right ) }\frac {d\tau }{\operatorname {RootOf}\left ( \sin \left ( \_Z\right ) +\_Z-\tau \right ) } & =x+c \end {align*}

If initial conditions \(y\left ( x_{0}\right ) =y_{0}\) are given, the above becomes\[ \int _{0}^{y_{0}}\frac {d\tau }{\operatorname {RootOf}\left ( \sin \left ( \_Z\right ) +\_Z-\tau \right ) }+\int _{y_{0}}^{y\left ( x\right ) }\frac {d\tau }{\operatorname {RootOf}\left ( \sin \left ( \_Z\right ) +\_Z-\tau \right ) }=x-x_{0}\]