Skip to content

02. Standard ODEs

$\gdef \N{\mathbb{N}} \gdef \Z{\mathbb{Z}} \gdef \Q{\mathbb{Q}} \gdef \R{\mathbb{R}} \gdef \C{\mathbb{C}} \gdef \setcomp#1{\overline{#1}} \gdef \sseq{\subseteq} \gdef \pset#1{\mathcal{P}(#1)} \gdef \covariant{\operatorname{Cov}} \gdef \of{\circ} \gdef \p{^{\prime}} \gdef \pp{^{\prime\prime}} \gdef \ppp{^{\prime\prime\prime}} \gdef \pn#1{^{\prime\times{#1}}} $

Separable Equations

Definition: Separable Equation

An ODE is separable if it has the form \(y\p=f(y)\cdot g(x)\)

Example of a Separable Equation

\[\begin{aligned}y\p&=\frac{xy}{1+y}\\y\p&=x\cdot\frac y{1+y}\\f(y)&=\frac y{1+y} &g(x)=x\end{aligned}\]
How to solve Separable Equations
  1. Get the Equilibrium Solution:
    • \(y=k\) where \(k\) is any root of \(f\) (i.e., \(f(k)=0\))
  2. Divide by f(y):
    • \(\frac{y\p}{f(y)}=g(x)\)
  3. Integrate both sides:
    • (using the trick from the end of last page):
      \(\int \frac1{f(y)}dy = \int g(x)dx\)
  4. Solve for \(y\)

Linear 1st-Order Equations

Definition: Linear Equation

An ODE is linear if it has the form \(y\p+a(x)\cdot y=g(x)\)

Example of a Linear Equation

\[\begin{aligned}y\p+2xy&=x^2\\a(x)&=2x &g(x)&=x^2\end{aligned}\]
How to solve Linear Equations

To solve a Linear Equation, we use an “Integration Factor”. It’s common to see the notation \(\mu(x)\) for the Integration Factor, but we don’t use that notation.

Given a Linear Equation \(y\p+a(x)\cdot y=g(x)\):

  1. Compute the Integration Factor:
    • Let \(A(x)\) be an antiderivative of \(a(x)\), i.e., \(A\p(x)=a(x)\).
    • The Integration Factor is \(\mu(x)=e^{A(x)}\)
  2. Multiply the equation by the Integration Factor:
    • \(e^{A(x)}\cdot (y\p+a(x)\cdot y)=e^{A(x)}\cdot g(x)\)
  3. Integrate both sides:
    • \(\int e^{A(x)}\cdot (y\p+a(x)\cdot y)dx=\int e^{A(x)}\cdot g(x)dx\)
    • Due to the awesome properties of the Integration Factor, the left side is just \(e^{A(x)}\cdot y\). Easy peasy!
    • The right side is standard integration.
  4. Solve for \(y\):
    • Divide by the Integration Factor to get \(y\) by itself.

Homogeneous Equations

Definition: Homogeneous Equation

An ODE is homogeneous if it can be written in the form \(y' = f\left(\frac{y}{x}\right)\), where \(f\) is a homogeneous function of \(x\) and \(y\).

Alternatively, \(f(x, y)\) is homogeneous if it can be expressed as a function of the single variable \(z = \frac{y}{x}\).

A function \(f(x, y)\) is called homogeneous of degree \(n\) if for any non-zero constant \(k\),

\[f(kx, ky) = k^n f(x, y)\]

Example of a Homogeneous Function

\[f(x, y) = \frac{y^3}{x^3}\]

Verifying homogeneity:

\[f(kx, ky) = \frac{(ky)^3}{(kx)^3} = \frac{k^3 y^3}{k^3 x^3} = \frac{y^3}{x^3} = f(x, y)\]

Example of a Homogeneous Function

\[f(x, y) = \frac{y^2 + 5xy}{10xy + x^2}\]

Verifying homogeneity:

\[f(kx, ky) = \frac{(ky)^2 + 5(kx)(ky)}{10(kx)(ky) + (kx)^2} = \frac{k^2 y^2 + 5k^2 xy}{10k^2 xy + k^2 x^2} = \frac{k^2 (y^2 + 5xy)}{k^2 (10xy + x^2)} = \frac{y^2 + 5xy}{10xy + x^2} = f(x, y)\]

Example of expressing a Homogeneous Function in terms of \(z\)

\[f(x, y) = \frac{y^2 + 5xy}{10xy + x^2}\]

Expressing in terms of \(z\):

\[f(x, y) = \frac{y^2 + 5xy}{10xy + x^2} \cdot \frac{\frac{1}{x^2}}{\frac{1}{x^2}} = \frac{\left( \frac{y}{x} \right)^2 + 5 \left( \frac{y}{x} \right)}{10 \left( \frac{y}{x} \right) + 1} = \frac{z^2 + 5z}{10z + 1}=f(z)\]

Spotting a Homogeneous Equation

An equation is homogeneous if all terms in the equation are of the same degree.

How to Solve a Homogeneous ODE
  1. Substitute \(z=\frac yx\):
    • \(y=zy\)
    • \(y'=z'x+z\)
  2. Rewrite the ODE:
    • \(z'x+z=f(z)\)
    • \(z'=\frac{f(z)-z}{x}\)
    • \(z'=(f(z)-z)\cdot\frac{1}{x}\)
    • Solve for \(z\) as a Separable Equation
    • Unsubstitute \(\frac yx = z\)
    • Multiply both sizes by \(x\) to solve for \(y\).

Solving a Homogeneous ODE

\[y'=\frac{3y^2-x^2}{2xy}\textcolor{green}{\cdot \frac{{1}/{x^2}}{{1}/{x^2}}}=\frac{3z^2-1}{2z}\]

Let \(z=\frac yx\Rightarrow y=zx\Rightarrow y'=z'x+z\)
Rewrite ODE in terms of \(z\):

\[z'x+z=\frac{3z^2-1}{2z}\]

Isolate \(z\):

\[z'=\frac1x\left(\frac{3z^2-1}{2z}-z\right)=\frac1x\left(\frac{z^2-1}{2z}\right)\]

Equilibrium Solutions: \((z^2-1)=0\Rightarrow z=\pm1\Rightarrow\frac yx=\pm1\Rightarrow y=\pm x\)

Separate sides and integrate:

\[\frac{2z}{z^2-1}\cdot z'=\frac1x\Rightarrow\int\frac{2z}{z^2-1}dz=\int\frac1xdx\]

Solve integral:

\[\ln|z^2-1|=\ln|x|+C\Rightarrow z^2=1+Cx\Rightarrow z=\pm\sqrt{1+Cx}\]

Unsubstitute \(z=\frac yx\):

\[\frac yx=\pm\sqrt{1+Cx}\Rightarrow y=\pm x\sqrt{1+Cx}\]

Bernoulli Equations

Definition: Bernoulli Equation

A Bernoulli Equation is an ODE that can be written in the form \(y' +a(x)\cdot y=b(x)\cdot y^\alpha\)

Note: If \(\alpha=0,1\) then this is a regular linear equation.

How to solve Bernoulli Equations
  1. Divide both sides by \(y^\alpha\):
    • \(y'y^{-\alpha}+a(x)\cdot y^{1-\alpha}=b(x)\)
  2. Substitue \(z=y^{1-\alpha}\)
    • \(y'y^{-\alpha}=\frac{z'}{1-\alpha}\)
  3. Equation now has the form \(\frac{z'}{1-\alpha}+a(x)\cdot z=b(x)\)
    • \(z'+(1-\alpha)a(x)\cdot z=b(x)\)
  4. This is a linear equation in terms of \(z\), solve using integration factor as usual.
  5. Solve for \(y\) using the relation \(z=y^{1-\alpha}\)

Existence and Uniqueness Theorem

Often, we cannot find a solution as a “neat formula” to an IVP. However, we’d at least like to know:

  1. Does the IVP have some solution?
  2. If so, is it the only one?

Existence and Uniqueness Theorem for First Order ODEs

Given the IVP \(\cases{y'=f(x,y)\\ y(x_0)=y_0}\):
If there exists a rectangle \(D=\left\{(x,y):\ \begin{align}\alpha<&x<\beta\\\gamma<&y<\delta\end{align}\right\}\) containing the point \((x_0, y_0)\) in which:

  1. \(f(x, y)\) is continuous
  2. The partial derivative \(f_y\) is continuous

Then there exists an interval containing \(x_0\) in which the IVP has a unique solution.

Partial Derivative fy

\(f_y\) is the derivative of \(f\) by treating \(x\) as if it were a constant.

Example of taking a Partial Derivative

Suppose \(f(x,y)=x^2y-3xy^2+\frac{5x}{y} +4\sin x\).
\(f_y=x^2-6xy-\frac{5x}{y^2}\)