Thursday, August 15, 2013

Differential Equations #2: Separable Differential Equations

Separable Equations

Here is where we start looking at differential equations that are more complex than y' = f(x). We will look at some techniques that can be used. Please note that no one technique will analytically solve all differential equations.

When solving differential equations, sometimes intuition, good algebra, and perhaps luck, we can separate variables of a first-order ordinary differential equation into the form of:

f(x) dx + g(y) dy = 0
[y is a function of x]

Taking the integral of each variable separably will yield:

∫ f(x) dx + ∫ g(y) dy = ∫ 0 dx
∫ f(x) dx + ∫ g(y) dy = C

We could also see the form:

f(x) dx = g(y) dy
∫ f(x) dx = ∫ g(y) dy

The answer could take either form:
∫ f(x) dx + C = ∫ g(y) dy, or
∫ f(x) dx = ∫ g(y) dy + C

Remember C is just an arbitrary constant. If we have initial conditions attached to the differential equation, then we can solve for C.

At this point, we may or may not be able to explicitly solve for y. The best way to tell whether a differential equation is separable is by practice and experience. Let's look at a few examples.

1. y^2 * y' = x^2

y' is short notation for dy/dx (or dy/dt if the dependent variable is t).

y^2 * y' = x^2
y^2 * dy/dx = x^2
y^2 dy = x^2 dx
∫ y^2 dy = ∫ x^2 dx + C
y^3/3 = x^3/3 + C

Solving for y, we get y = (x^3 + C/3)^(1/3).

2. e^(y-x)*dy/dx = 1

e^(y-x)*dy/dx = 1
e^y * e^(-x) * dy/dx = 1
e^y * dy = e^x * dx
∫ e^y dy = ∫ e^x dx + C
e^y = e^x + C

Solving for y, we get y = ln (e^x + C).

3. dy/dx = y^2 - 6*y + 9

dy/dx = y^2 - 6*y + 9

Diving by y^2 - 6*y + 9, (making an assumption that y ≠ 3 which we are not dividing by zero),

dy/dx * 1/(y^2 - 6*y + 9) = 1
dy/(y^2 - 6*y + 9) = dx
dy/(y - 3)^2 = dx
∫ dy/(y - 3)^2 = ∫ dx
-1/(y - 3) = x + C
1/(3 - y) = x + C
3 - y = 1/(x + C)
-y = -3 + 1/(x + C)
y = 3 - 1/(x + C)

Here is a separable differential equation with an initial condition:
4. y' = y^2 * x^3, y(1)=4

Solve the differential equation first:

dy/dx = y^2 * x^3
y^-2 dy = x^3 dx
∫ y^-2 dy = ∫ x^3 dx
-1/y = x^4/4 + C
-y = 1/(x^4/4 + C)
y = -1/(x^4/4 + C)

Now using the initial condition y(1)=4,
4 = -1/(1/4 + C)
4 * (1/4 + C) = -1
1 + 4*C = -1
C = 1/2

The final answer is y = -1/(x^4/4 + 1/2).

The next time we talk on this subject we will be looking at integrating factors. Eddie


This blog is property of Edward Shore. 2013