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) y ′ = f ( y ) ⋅ g ( x )
Example of a Separable Equation
y ′ = x y 1 + y y ′ = x ⋅ y 1 + y f ( y ) = y 1 + y g ( 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} y ′ y ′ f ( y ) = 1 + y x y = x ⋅ 1 + y y = 1 + y y g ( x ) = x
How to solve Separable Equations
Get the Equilibrium Solution:
y = k y=k y = k where k k k is any root of f f f (i.e., f ( k ) = 0 f(k)=0 f ( k ) = 0 )
Divide by f(y):
y ′ f ( y ) = g ( x ) \frac{y\p}{f(y)}=g(x) f ( y ) y ′ = g ( x )
Integrate both sides:
(using the trick from the end of last page):
∫ 1 f ( y ) d y = ∫ g ( x ) d x \int \frac1{f(y)}dy = \int g(x)dx ∫ f ( y ) 1 d y = ∫ g ( x ) d x
Solve for y y y
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) y ′ + a ( x ) ⋅ y = g ( x )
Example of a Linear Equation
y ′ + 2 x y = x 2 a ( x ) = 2 x g ( x ) = x 2 \begin{aligned}y\p+2xy&=x^2\\a(x)&=2x &g(x)&=x^2\end{aligned} y ′ + 2 x y a ( x ) = x 2 = 2 x g ( x ) = x 2
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) μ ( 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) y ′ + a ( x ) ⋅ y = g ( x ) :
Compute the Integration Factor:
Let A ( x ) A(x) A ( x ) be an antiderivative of a ( x ) a(x) a ( x ) , i.e., A ′ ( x ) = a ( x ) A\p(x)=a(x) A ′ ( x ) = a ( x ) .
The Integration Factor is μ ( x ) = e A ( x ) \mu(x)=e^{A(x)} μ ( x ) = e A ( x )
Multiply the equation by the Integration Factor:
e A ( x ) ⋅ ( y ′ + a ( x ) ⋅ y ) = e A ( x ) ⋅ g ( x ) e^{A(x)}\cdot (y\p+a(x)\cdot y)=e^{A(x)}\cdot g(x) e A ( x ) ⋅ ( y ′ + a ( x ) ⋅ y ) = e A ( x ) ⋅ g ( x )
Integrate both sides:
∫ e A ( x ) ⋅ ( y ′ + a ( x ) ⋅ y ) d x = ∫ e A ( x ) ⋅ g ( x ) d x \int e^{A(x)}\cdot (y\p+a(x)\cdot y)dx=\int e^{A(x)}\cdot g(x)dx ∫ e A ( x ) ⋅ ( y ′ + a ( x ) ⋅ y ) d x = ∫ e A ( x ) ⋅ g ( x ) d x
Due to the awesome properties of the Integration Factor, the left side is just e A ( x ) ⋅ y e^{A(x)}\cdot y e A ( x ) ⋅ y . Easy peasy!
The right side is standard integration.
Solve for y y y :
Divide by the Integration Factor to get y y y by itself.
Homogeneous Equations
Definition: Homogeneous Equation
An ODE is homogeneous if it can be written in the form y ′ = f ( y x ) y' = f\left(\frac{y}{x}\right) y ′ = f ( x y ) , where f f f is a homogeneous function of x x x and y y y .
Alternatively, f ( x , y ) f(x, y) f ( x , y ) is homogeneous if it can be expressed as a function of the single variable z = y x z = \frac{y}{x} z = x y .
A function f ( x , y ) f(x, y) f ( x , y ) is called homogeneous of degree n n n if for any non-zero constant k k k ,
f ( k x , k y ) = k n f ( x , y ) f(kx, ky) = k^n f(x, y) f ( k x , k y ) = k n f ( x , y )
Example of a Homogeneous Function
f ( x , y ) = y 3 x 3 f(x, y) = \frac{y^3}{x^3} f ( x , y ) = x 3 y 3 Verifying homogeneity:
f ( k x , k y ) = ( k y ) 3 ( k x ) 3 = k 3 y 3 k 3 x 3 = y 3 x 3 = 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) f ( k x , k y ) = ( k x ) 3 ( k y ) 3 = k 3 x 3 k 3 y 3 = x 3 y 3 = f ( x , y )
Example of a Homogeneous Function
f ( x , y ) = y 2 + 5 x y 10 x y + x 2 f(x, y) = \frac{y^2 + 5xy}{10xy + x^2} f ( x , y ) = 10 x y + x 2 y 2 + 5 x y Verifying homogeneity:
f ( k x , k y ) = ( k y ) 2 + 5 ( k x ) ( k y ) 10 ( k x ) ( k y ) + ( k x ) 2 = k 2 y 2 + 5 k 2 x y 10 k 2 x y + k 2 x 2 = k 2 ( y 2 + 5 x y ) k 2 ( 10 x y + x 2 ) = y 2 + 5 x y 10 x y + x 2 = 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) f ( k x , k y ) = 10 ( k x ) ( k y ) + ( k x ) 2 ( k y ) 2 + 5 ( k x ) ( k y ) = 10 k 2 x y + k 2 x 2 k 2 y 2 + 5 k 2 x y = k 2 ( 10 x y + x 2 ) k 2 ( y 2 + 5 x y ) = 10 x y + x 2 y 2 + 5 x y = f ( x , y )
Example of expressing a Homogeneous Function in terms of
z z z f ( x , y ) = y 2 + 5 x y 10 x y + x 2 f(x, y) = \frac{y^2 + 5xy}{10xy + x^2} f ( x , y ) = 10 x y + x 2 y 2 + 5 x y Expressing in terms of z z z :
f ( x , y ) = y 2 + 5 x y 10 x y + x 2 ⋅ 1 x 2 1 x 2 = ( y x ) 2 + 5 ( y x ) 10 ( y x ) + 1 = z 2 + 5 z 10 z + 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) f ( x , y ) = 10 x y + x 2 y 2 + 5 x y ⋅ x 2 1 x 2 1 = 10 ( x y ) + 1 ( x y ) 2 + 5 ( x y ) = 10 z + 1 z 2 + 5 z = 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
Substitute z = y x z=\frac yx z = x y :
y = z y y=zy y = z y
y ′ = z ′ x + z y'=z'x+z y ′ = z ′ x + z
Rewrite the ODE:
z ′ x + z = f ( z ) z'x+z=f(z) z ′ x + z = f ( z )
z ′ = f ( z ) − z x z'=\frac{f(z)-z}{x} z ′ = x f ( z ) − z
z ′ = ( f ( z ) − z ) ⋅ 1 x z'=(f(z)-z)\cdot\frac{1}{x} z ′ = ( f ( z ) − z ) ⋅ x 1
Solve for z z z as a Separable Equation
Unsubstitute y x = z \frac yx = z x y = z
Multiply both sizes by x x x to solve for y y y .
Solving a Homogeneous ODE
y ′ = 3 y 2 − x 2 2 x y ⋅ 1 / x 2 1 / x 2 = 3 z 2 − 1 2 z y'=\frac{3y^2-x^2}{2xy}\textcolor{green}{\cdot \frac{{1}/{x^2}}{{1}/{x^2}}}=\frac{3z^2-1}{2z} y ′ = 2 x y 3 y 2 − x 2 ⋅ 1 / x 2 1 / x 2 = 2 z 3 z 2 − 1 Let z = y x ⇒ y = z x ⇒ y ′ = z ′ x + z z=\frac yx\Rightarrow y=zx\Rightarrow y'=z'x+z z = x y ⇒ y = z x ⇒ y ′ = z ′ x + z
Rewrite ODE in terms of z z z :
z ′ x + z = 3 z 2 − 1 2 z z'x+z=\frac{3z^2-1}{2z} z ′ x + z = 2 z 3 z 2 − 1 Isolate z z z :
z ′ = 1 x ( 3 z 2 − 1 2 z − z ) = 1 x ( z 2 − 1 2 z ) z'=\frac1x\left(\frac{3z^2-1}{2z}-z\right)=\frac1x\left(\frac{z^2-1}{2z}\right) z ′ = x 1 ( 2 z 3 z 2 − 1 − z ) = x 1 ( 2 z z 2 − 1 ) Equilibrium Solutions: ( z 2 − 1 ) = 0 ⇒ z = ± 1 ⇒ y x = ± 1 ⇒ y = ± x (z^2-1)=0\Rightarrow z=\pm1\Rightarrow\frac yx=\pm1\Rightarrow y=\pm x ( z 2 − 1 ) = 0 ⇒ z = ± 1 ⇒ x y = ± 1 ⇒ y = ± x
Separate sides and integrate:
2 z z 2 − 1 ⋅ z ′ = 1 x ⇒ ∫ 2 z z 2 − 1 d z = ∫ 1 x d x \frac{2z}{z^2-1}\cdot z'=\frac1x\Rightarrow\int\frac{2z}{z^2-1}dz=\int\frac1xdx z 2 − 1 2 z ⋅ z ′ = x 1 ⇒ ∫ z 2 − 1 2 z d z = ∫ x 1 d x Solve integral:
ln ∣ z 2 − 1 ∣ = ln ∣ x ∣ + C ⇒ z 2 = 1 + C x ⇒ z = ± 1 + C x \ln|z^2-1|=\ln|x|+C\Rightarrow z^2=1+Cx\Rightarrow z=\pm\sqrt{1+Cx} ln ∣ z 2 − 1∣ = ln ∣ x ∣ + C ⇒ z 2 = 1 + C x ⇒ z = ± 1 + C x Unsubstitute z = y x z=\frac yx z = x y :
y x = ± 1 + C x ⇒ y = ± x 1 + C x \frac yx=\pm\sqrt{1+Cx}\Rightarrow y=\pm x\sqrt{1+Cx} x y = ± 1 + C x ⇒ y = ± x 1 + C x
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 y ′ + a ( x ) ⋅ y = b ( x ) ⋅ y α
Note: If α = 0 , 1 \alpha=0,1 α = 0 , 1 then this is a regular linear equation .
How to solve Bernoulli Equations
Divide both sides by y α y^\alpha y α :
y ′ y − α + a ( x ) ⋅ y 1 − α = b ( x ) y'y^{-\alpha}+a(x)\cdot y^{1-\alpha}=b(x) y ′ y − α + a ( x ) ⋅ y 1 − α = b ( x )
Substitue z = y 1 − α z=y^{1-\alpha} z = y 1 − α
y ′ y − α = z ′ 1 − α y'y^{-\alpha}=\frac{z'}{1-\alpha} y ′ y − α = 1 − α z ′
Equation now has the form z ′ 1 − α + a ( x ) ⋅ z = b ( x ) \frac{z'}{1-\alpha}+a(x)\cdot z=b(x) 1 − α z ′ + a ( x ) ⋅ z = b ( x )
z ′ + ( 1 − α ) a ( x ) ⋅ z = b ( x ) z'+(1-\alpha)a(x)\cdot z=b(x) z ′ + ( 1 − α ) a ( x ) ⋅ z = b ( x )
This is a linear equation in terms of z z z , solve using integration factor as usual.
Solve for y y y using the relation z = y 1 − α z=y^{1-\alpha} z = y 1 − α
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 { y ′ = f ( x , y ) y ( x 0 ) = y 0 \begin{cases}y'=f(x,y)\\ y(x_0)=y_0\end{cases} { y ′ = f ( x , y ) y ( x 0 ) = y 0 : 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\} D = { ( x , y ) : α < γ < x < β y < δ } containing the point ( x 0 , y 0 ) (x_0, y_0) ( x 0 , y 0 ) in which:
f ( x , y ) f(x, y) f ( x , y ) is continuous
The partial derivative f y f_y f y is continuous
Then there exists an interval containing x 0 x_0 x 0 in which the IVP has a unique solution.
Partial Derivative fy
f y f_y f y is the derivative of f f f by treating x x x as if it were a constant.
Example of taking a Partial Derivative
Suppose f ( x , y ) = x 2 y − 3 x y 2 + 5 x y + 4 sin x f(x,y)=x^2y-3xy^2+\frac{5x}{y} +4\sin x f ( x , y ) = x 2 y − 3 x y 2 + y 5 x + 4 sin x .
f y = x 2 − 6 x y − 5 x y 2 f_y=x^2-6xy-\frac{5x}{y^2} f y = x 2 − 6 x y − y 2 5 x