02. Standard ODEs
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
How to solve Separable Equations¶
- Get the Equilibrium Solution:
- \(y=k\) where \(k\) is any root of \(f\) (i.e., \(f(k)=0\))
- Divide by f(y):
- \(\frac{y\p}{f(y)}=g(x)\)
- Integrate both sides:
- (using the trick from the end of last page):
\(\int \frac1{f(y)}dy = \int g(x)dx\)
- (using the trick from the end of last page):
- 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
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)\):
- 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)}\)
- Multiply the equation by the Integration Factor:
- \(e^{A(x)}\cdot (y\p+a(x)\cdot y)=e^{A(x)}\cdot g(x)\)
- 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.
- 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\),
Example of a Homogeneous Function
Verifying homogeneity:
Example of a Homogeneous Function
Verifying homogeneity:
Example of expressing a Homogeneous Function in terms of \(z\)
Expressing in terms of \(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¶
- Substitute \(z=\frac yx\):
- \(y=zy\)
- \(y'=z'x+z\)
- 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
Let \(z=\frac yx\Rightarrow y=zx\Rightarrow y'=z'x+z\)
Rewrite ODE in terms of \(z\):
Isolate \(z\):
Equilibrium Solutions: \((z^2-1)=0\Rightarrow z=\pm1\Rightarrow\frac yx=\pm1\Rightarrow y=\pm x\)
Separate sides and integrate:
Solve integral:
Unsubstitute \(z=\frac yx\):
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¶
- Divide both sides by \(y^\alpha\):
- \(y'y^{-\alpha}+a(x)\cdot y^{1-\alpha}=b(x)\)
- Substitue \(z=y^{1-\alpha}\)
- \(y'y^{-\alpha}=\frac{z'}{1-\alpha}\)
- Equation now has the form \(\frac{z'}{1-\alpha}+a(x)\cdot z=b(x)\)
- \(z'+(1-\alpha)a(x)\cdot z=b(x)\)
- This is a linear equation in terms of \(z\), solve using integration factor as usual.
- 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:
- Does the IVP have some solution?
- 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:
- \(f(x, y)\) is continuous
- 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}\)