ODEs· Note 02

Standard ODEs

Year 2 · Semester IILast updated

Separable Equations

Definition: Separable Equation

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

Example of a Separable Equation
y′=xy1+yy′=x⋅y1+yf(y)=y1+yg(x)=x\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=ky=k where kk is any root of ff (i.e., f(k)=0f(k)=0)
  2. Divide by f(y):
    • y′f(y)=g(x)\frac{y\p}{f(y)}=g(x)
  3. Integrate both sides:
    • (using the trick from the end of last page):
      ∫1f(y)dy=∫g(x)dx\int \frac1{f(y)}dy = \int g(x)dx
  4. Solve for yy

Linear 1st-Order Equations

Definition: Linear Equation

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

Example of a Linear Equation
y′+2xy=x2a(x)=2xg(x)=x2\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 μ(x)\mu(x) for the Integration Factor, but we don’t use that notation.

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

  1. Compute the Integration Factor:
    • Let A(x)A(x) be an antiderivative of a(x)a(x), i.e., A′(x)=a(x)A\p(x)=a(x).
    • The Integration Factor is μ(x)=eA(x)\mu(x)=e^{A(x)}
  2. Multiply the equation by the Integration Factor:
    • eA(x)⋅(y′+a(x)⋅y)=eA(x)⋅g(x)e^{A(x)}\cdot (y\p+a(x)\cdot y)=e^{A(x)}\cdot g(x)
  3. Integrate both sides:
    • ∫eA(x)⋅(y′+a(x)⋅y)dx=∫eA(x)⋅g(x)dx\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 eA(x)⋅ye^{A(x)}\cdot y. Easy peasy!
    • The right side is standard integration.
  4. Solve for yy:
    • Divide by the Integration Factor to get yy by itself.

Homogeneous Equations

Definition: Homogeneous Equation

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

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

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

f(kx,ky)=knf(x,y)f(kx, ky) = k^n f(x, y)
Example of a Homogeneous Function
f(x,y)=y3x3f(x, y) = \frac{y^3}{x^3}

Verifying homogeneity:

f(kx,ky)=(ky)3(kx)3=k3y3k3x3=y3x3=f(x,y)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)=y2+5xy10xy+x2f(x, y) = \frac{y^2 + 5xy}{10xy + x^2}

Verifying homogeneity:

f(kx,ky)=(ky)2+5(kx)(ky)10(kx)(ky)+(kx)2=k2y2+5k2xy10k2xy+k2x2=k2(y2+5xy)k2(10xy+x2)=y2+5xy10xy+x2=f(x,y)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 zz
f(x,y)=y2+5xy10xy+x2f(x, y) = \frac{y^2 + 5xy}{10xy + x^2}

Expressing in terms of zz:

f(x,y)=y2+5xy10xy+x2⋅1x21x2=(yx)2+5(yx)10(yx)+1=z2+5z10z+1=f(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=yxz=\frac yx:
    • y=zyy=zy
    • y′=z′x+zy'=z'x+z
  2. Rewrite the ODE:
    • z′x+z=f(z)z'x+z=f(z)
    • z′=f(z)−zxz'=\frac{f(z)-z}{x}
    • z′=(f(z)−z)⋅1xz'=(f(z)-z)\cdot\frac{1}{x}
  • Solve for zz as a Separable Equation
  • Unsubstitute yx=z\frac yx = z
  • Multiply both sizes by xx to solve for yy.
Solving a Homogeneous ODE
y′=3y2−x22xy⋅1/x21/x2=3z2−12zy'=\frac{3y^2-x^2}{2xy}\textcolor{green}{\cdot \frac{{1}/{x^2}}{{1}/{x^2}}}=\frac{3z^2-1}{2z}

Let z=yx⇒y=zx⇒y′=z′x+zz=\frac yx\Rightarrow y=zx\Rightarrow y'=z'x+z
Rewrite ODE in terms of zz:

z′x+z=3z2−12zz'x+z=\frac{3z^2-1}{2z}

Isolate zz:

z′=1x(3z2−12z−z)=1x(z2−12z)z'=\frac1x\left(\frac{3z^2-1}{2z}-z\right)=\frac1x\left(\frac{z^2-1}{2z}\right)

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

Separate sides and integrate:

2zz2−1⋅z′=1x⇒∫2zz2−1dz=∫1xdx\frac{2z}{z^2-1}\cdot z'=\frac1x\Rightarrow\int\frac{2z}{z^2-1}dz=\int\frac1xdx

Solve integral:

ln⁡∣z2−1∣=ln⁡∣x∣+C⇒z2=1+Cx⇒z=±1+Cx\ln|z^2-1|=\ln|x|+C\Rightarrow z^2=1+Cx\Rightarrow z=\pm\sqrt{1+Cx}

Unsubstitute z=yxz=\frac yx:

yx=±1+Cx⇒y=±x1+Cx\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)⋅y=b(x)⋅yαy' +a(x)\cdot y=b(x)\cdot y^\alpha

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

How to solve Bernoulli Equations

  1. Divide both sides by yαy^\alpha:
    • y′y−α+a(x)⋅y1−α=b(x)y'y^{-\alpha}+a(x)\cdot y^{1-\alpha}=b(x)
  2. Substitue z=y1−αz=y^{1-\alpha}
    • y′y−α=z′1−αy'y^{-\alpha}=\frac{z'}{1-\alpha}
  3. Equation now has the form z′1−α+a(x)⋅z=b(x)\frac{z'}{1-\alpha}+a(x)\cdot z=b(x)
    • z′+(1−α)a(x)⋅z=b(x)z'+(1-\alpha)a(x)\cdot z=b(x)
  4. This is a linear equation in terms of zz, solve using integration factor as usual.
  5. Solve for yy using the relation z=y1−α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 {y′=f(x,y)y(x0)=y0\begin{cases}y'=f(x,y)\\ y(x_0)=y_0\end{cases}:
If there exists a rectangle D={(x,y): α<x<βγ<y<δ}D=\left\{(x,y):\ \begin{aligned}\alpha<&x<\beta\\\gamma<&y<\delta\end{aligned}\right\} containing the point (x0,y0)(x_0, y_0) in which:

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

Then there exists an interval containing x0x_0 in which the IVP has a unique solution.

Partial Derivative fy

fyf_y is the derivative of ff by treating xx as if it were a constant.

Example of taking a Partial Derivative

Suppose f(x,y)=x2y−3xy2+5xy+4sin⁡xf(x,y)=x^2y-3xy^2+\frac{5x}{y} +4\sin x.
fy=x2−6xy−5xy2f_y=x^2-6xy-\frac{5x}{y^2}