Sunday, May 26, 2013

First order equations - method of integrating factor

As promised, here is the second method of solving first order equations. This method works only on linear equations - see my earlier post on classifying ODE's if you're not sure.

I am a big advocate of teaching with examples. Here's one:

2dy/dx + 2y/x = 4x

The first step is to always make sure the coefficient on your dy/dx term is 1. So in our case, we need to divide both sides by 2 in order to make this true.

dy/dx + y/x = 2x

Now we use the coefficient of the y term to find our integrating factor. The integrating factor is always equal to e to the power of the integral of that coefficient. So, in our case, IF = e∫1/x = eln(x) = x (for this integral, ignore the addition of + c that you usually use).

Now multiply both sides by the integrating factor.

(dy/dx + y/x)*x  = 2x2

Here is the step where a lot of people get confused. The why behind this is not immediately obvious (I will include a quick proof at the bottom of this post), but every time, the left hand side of the equation will reduce to the derivative of y times the integrating factor. This is a property special to the integrating factor and is the reason why it is defined the way it is.

(y * x)' = 2x2

So now, to nullify that derivative, we just have to integrate both sides. You'll notice that our integrating factor in this example was very "nice" in the sense that it reduced down to x instead of involving an exponential term like it most often will. In these other cases, it may be necessary to use integration by parts.

y * x = 2/3x3

Then divide the integrating factor out to isolate y.

y = 2/3x2

And that's the answer! Now for that proof...you won't need to know this for class, but I don't like to make unsubstantiated claims.

Remember that the integrating factor was e to the power of the integral of the coefficient in front of your y term. Let's call this coefficient p. So my claim was that the left hand side of your equation should always equal the derivative of y times the integrating factor. If you want to actually do out this derivative, you'll have to use product rule:

(y * e∫p)' = y' * e∫p + y * (∫p)'e∫p

Let's clean this up a bit. The derivative of the integral of p is just p. We can represent y' as dy/dx. And we can pull out a common factor of e∫p:

(dy/dx + py)*e∫p

But wait! That's just the original lefthand side of the equation times the integrating factor. Which is exactly what we were trying to prove this was equal to.

Happy calculating,
Rachel

No comments:

Post a Comment