Differential Equations/Separable 1

From testwiki
Revision as of 06:18, 29 October 2007 by 128.164.62.130 (talk) (Example 4)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
From Differential Equations
First Order Differential Equations

What are Separable Variables?

A differential equation with separable variables is an equation where a function of x is multiplied to a function of y:

dydx=f(x)g(y)

In order for it to be separable, there can be no terms where x and y are added instead of multiplied unless it can be factored into this form. If there are, it is not separable and must be solved using other methods.

Trivial cases

There are two special cases of a separable equation that make the solution almost trivial. These are the cases where either

g(y)=k

or

f(x)=k,

where k is a constant. In either case, the equation changes from being in terms of 3 variables and reduces down to 2. When we can throw out one of the two variables, the solution can be achieved by a simple integral.

No y term: g(y)=k

If g(y)=k, we can treat k as part of f(x), and turn g(y) into 1. Now, we're left with

dydx=f(x)1=f(x).

This is now basic calculus - take the integral of both sides. The general solution is

y=f(x)dx+C,

where C is a constant.

Let's take a look at a few examples.

Example 1

dydx=x2+7
Here, we have a derivative equalling a function of x. The original function is the antiderivative of this, that is, we have to integrate to find it. Now we integrate both sides of the equation, w.r.t.x:
dydxdx=(x2+7)dx
y=13x3+7x+C
This is the general solution. A function that solves a differential equation is said to satisfy it, so
y=13x3+7x+C
satisfies the differential equation
dydx=x2+7.

Example 2

dydx=sinx+ex
This works the same as before - integrate both sides w.r.t.x (with regard to 'x').
dydxdx=sinx+exdx
y=cosx+ex+C
This is the general solution.

No x term: f(x)=k

The other special case, where

f(x)=k,

is similar. The only difference is how we make it into an integrable form. Our equation is

dydx=kg(y).

Since we need to get all the y's on one side and x's on the others, we use a clever trick of our notation. The notation we are currently using, involving dy and dx in fractional form was invented by Leibnitz, one of the founders of integral calculus. He designed it so that the notation to some extent explained the calculations. Now, by themselves, dy and dx mean literally nothing - they represent infinitesimal quantities. What we are going to do is to split them up. This will involve a step which is not technically 'correct,' mathematically speaking. We are going to divide both sides of the equation by g(y), and multiply both sides by dx. This gives us

1g(y)dy=kdx.

What this represents is a infinitesimal slice of the the curve, and has no practical meaning. To get the actual curve, we add up all the slices. This is integration. So we write

1g(y)dy=kdx.

We now have two integrals, each with respect to the functions contained in them. The solution is of the form

1g(y)dy=kx+C.

You can now try to solve for y. It is possible that the LHS is not integrable, and in that case, we leave it in as clean a form as possible. Another important concept emerges here. After solving the integral on the LHS, there will be another constant of integration, D. Since both C and D are arbitrary numbers, we can collapse them both into one. Therefore, only one constant of integration is needed, and this is generally called C.

By multiplying by one thing, say a and dividing by another, say b, we can also write that as multiplying by ab. This is called the integrating factor, or factor of integration.

Example 3

dydx=ky
Where k is a constant. We perform our notational 'backflip', and we obtain:
1ydy=kdx
Integrate both sides to get
1ydy=kdx
ln(y)=kx+C
Now we need to solve for y
y=ekx+C
y=eCekx
Since eC is a constant itself, we can just call it C.
y=Cekx
This is the general solution, and serves to illustrate that the component defining the particular solution is not always added on, but can also be multiplied in. This result is a very important equation in both physics and biology, as I'll discuss in the examples section below.

Example 4

dydx=ky
Here we muliply through by y, and multiply through by dx. The rest of the math works as before.
ydy=kdx
ydy=kdx
12y2=kx+C
y2=2kx+C

In this case, its more convenient to solve for y2 than y. If we take the square root to solve for y, we change the equation (since the square root of a number is always positive, we would lose half of each solution curve). In these cases its just fine to leave it in its current form.

You may have noticed that the right hand side of the equation, before solving for y, is the same for both examples. When f(x)=k, the right hand side will always be kx+C where k is whatever constant is in the problem. It only changes when f(x) is not constant.

General Separable Variable Equations

In the most general case, neither f(x) or g(x) is a constant. In this case, we use the same method as before (although the variables might have to be separated first). The only difference is that the right hand side is a non-trivial integral, so we have to actually do work to figure out both sides. This can produce some untidy solutions, and DEs are known for this. This untidiness often means that we might want to check our result at the end.

Checking Solutions

How do we check our solutions? Simply plug them in. Let's say we have a solution y(x). We can easily find its derivative. If we just plug in for y and y', the two sides of the equation should be equal. If they aren't, we made a mistake. If our equation isn't in an easily differentiable a form, we will need to take the derivative of both sides, and then solve for y' before plugging in. Due to the chain rule, this generally isn't too bad - the derivatives almost always end up in the form

yf1(x,y)+yf2(x,y)+....fn(x,y)=fn+1(x,y).

Its just a matter of factoring out the y' and dividing by the other factors to solve for it.

For the following solutions, we'll check all our work to prove the answers.

Example 5

dydx=y3x
Dividing by y3 and multiplying by dx gives
dyy3=xdx
dyy3=xdx
12y2=12x2+C
y2=1x2+C
Like I said - an untidy solution. Now to check the answer. First, let's take the derivative of the LHS of the solution.
ddxy2=2ydydx
Now for the RHS:
ddx(1x2+C)=2x(x2+C)2
so, equating,
2ydydx=2x(x2+C)2
Now, solve that for dydx:
dydx=xy(x2+C)2
Finally, plug into the original equation and see if it checks.
dydx=y3x
xy(x2+C)2=(1x2+C)32x
x(1x2+C)12(x2+C)2=(1x2+C)32x
Multiply both sides by (1x2+C)12 to show that
x(x2+C)2=(1x2+C)2x
hence
x(x2+C)2=x(x2+C)2
This turns out to be right (the two sides equal each other), so the solution is correct. Solving this problem was probably easier than checking it, but at least you know you can do it if you need to be sure you're right.

Example 6

dydx=yx
We multiply by dxy:
dyy=dxx
dyy=dxx
ln(y)=ln(x)+C
y=eln(x)+C=eCeln(x)=Cx
Now to check our working. Solve for dydx:
dydx=C
Now plug in
y=yx
C=Cxx
C=C

This confirms our solution.

Example 7

dydx=xy+y
This doesn't look separable at first glance. A little factoring can be applied though:
dydx=(x+1)y
This is separable with an integration factor of dxy
dyy=(x+1)dx
dyy=(x+1)dx
ln(y)=12x2+x+C
y=Ce12x2+x
Now to check our answer. First, solve for dydx:
dydx=(x+1)Ce12x2+x
Now plug in and see if they match
dydx=xy+y
(x+1)Ce12x2+x=xCe12x2+x+Ce12x2+x
(x+1)Ce12x2+x=(x+1)Ce12x2+x
Once again, our solution is confirmed.

Problems with Boundary Conditions

In all the previous problems, each equation had infinite possible solutions due to the constant in the answer. This solution is called the general solution. It is possible to solve a problem for a single solution, if you have a set of boundary conditions. There is a value for the function y at a given point a, in other words y(a)=b. First-order DEs require just one boundary condition, but higher order DEs need more. This will be described in the relevant sections. The solution so gained is the particular solution.

Solving an initial value problem is fairly easy. Solve for y as we did above. Then once you have the equation, plug in b for y and a for x. Then, solve for the constant.

Example 8

dydx=ky,y(0)=10
As we saw in example 3, the general solution to this is y=Cekx. Let's plug in our boundary conditions:
10=Ce0k
10=Ce0
C=10
y=10ekx
This is the particular solution.


Proceed to the next part of the lesson: Examples

Existence and Uniqueness

So, does this mean that if we have an initial condition we will always have 1 and only 1 solution? Well, not exactly, it's still possible in some circumstances to have either none or infinitely many solutions.

Theorem 1: If we have an initial value problem y=f(x,y),y(a)=b, we are guaranteed a solution will exist if f(x,y) is continuous on some rectangle I surrounding the point (a,b).

Basically this means that so long as there is no discontinuity at point (a,b), there is at least 1 solution to the problem at that point. There can still be more than 1 solution, though.

Theorem 2: If fy is continuous as well, then the solution is unique on some interval J containing x=a.

So if fy has no discontinuity at x=a, and f(x,y) has no discontinuity around (a,b), there is a solution and the solution is unique. If fy has a discontinuity at x=a, there is at least 1 other solution. This solution is usually a trivial solution y(x)=k where k is a constant.

Lets try a few examples.


Example 9

y=ky,y(10)=500

Is the equation f(x,y)=ky continuous? Yes.

Is the equation fy=k continuous? Yes.

So the solution exists and is unique.

Example 10

y=1x,y(0)=5

Is the equation f(x,y)=1x continuous? No. There is a discontinuity at x=0. If we used any other point it would exist.

So the solution does not exist.

Example 11

y=y1,y(1)=1

Is the equation f(x,y)=y1 continuous? Yes.

Is the equation fy=12(y1)12 continuous? No. It is discontinuous at y=1

So the solution exists and is not unique. The other solution happens to be the trivial solution y(x)=1.