Friday, March 18, 2011

7.4 - Integration by partial fractions, now with more ALT codes!

By this point, we can integrate functions until the cows come home. We were stopped a little bit by the difference of squares, but we figured it out. But we have one more major obstacle in our road to integration freedom - funny-looking rational functions.

We know how to find common denominators to add or subtract fractions. If we had 2/(x-1) - 1/(x +2), it would be no trouble to multiply both of them by what they would need to get their common denominator and subtract your little heart out. Therefore, if we saw a fraction with a denominator that could be factored, we could reasonably assume that we could split it apart.

Assume we have two functions - P(x) and Q(x), and both of them are polynomials. If we're trying to take P(x)/Q(x), then, as long as that fraction is proper (P is a lower degree than Q), then we can write this fraction as the sum of two simpler fractions. Once we have the sum of two easy fractions, then we have a 1/u and we can integrate without much fuss. If P is a higher degree than Q, then we just do a bit of long division first and voila. We'll all just pretend that you've been practicing your long division of polynomials since you got out algebra 2. You know, since you have to do that a lot.

So, when we're dividing up into partial fractions, there are two basic forms it will take:
either A/(ax+b)ⁿ
or (Ax+B)ⁿ/(ax²+bx+c)ⁿ
You should be able to divide your denominator into terms that fit that form. This leads to a few different scenarios.

SCENARIO 1 - The denominator consists of distinct linear factors.
It's possible that when you factor out your denominator, you'll end up with linear terms (Like ax+b) and none of them repeat. For example, 2x²+17x+21 factors out into (2x+3)(x+7).
If this is the case, then split it up into the sum of different constants with each of those factors as the denominator. Our above case would give us A/(2x+3) + B/(x+7) where A and B are two different constants (Though they may turn out to be equal. You never know in the crazy world of math. Woo!).
After that, leaving your A and B as variables, add those fractions back together with a common denominator. Let's say we were factoring (x+3)/(2x²+17x+21) so we can use our above factoring.
Once we add the fractions back together, if we keep our original function on the left side of our equation, we get:

(x+3)/(2x²+17x+21) = Ax+7A+2Bx+3B/(2x²+17x+21). (after multiplying to get common denominators.)

Since the two sides of equation are equal, and their denominators are equal, then their numerators have to be equal. Since no more work needs to be done on the denominators to make them equal, we'll ignore them for now and work on our numerators. After taking out the denominator, we're left with:

x+3 = Ax+7A+2Bx+3B

Since A and B are only constants, we know that when we add up all of the coefficiants of x, they'll give us 1, and all of the leftover constants will add up to 3. So let's separate our constants by the ones that are going to pertain to our x and our 3.

x +3 = x(A+2B) + (7A+3B)

Now we know that A+ 2B = 1 and 7A+3B = 3.
All that's left to do is solve our little system of equations, plug in the A and B values we find back into our equation up top, and we know have much tidier and easier to integrate fractions.

That's the most straightforward case, and the following cases are just variations on the above.

SCENARIO 2, ELECTRIC BOOGALOO- Linear factors, but some repeat.

So let's say your denominator factors, but some of them repeat themselves. If your denominator was x²+4x+4, then it factors out into (x+2)².
At first, you would think you would do the same as the above and have A/(x+2) + B/(x+2), but that's not the case. Instead, you list each "incarnation" of the term that can be factored out of it. It's hard to say in words, but this one would become:
A/(x+2) + B/(x+2)²
If the denominator was (x+2)^7, it would look like:
A/(x+2) + B/(x+2)² + C/(x+2)³... G/(x+2)^7.

So you make a factor out of each "Step" on the way to the power of the denominator. It's a little weird, and the book decides not to explain why because I'm sure way back in algebra that was explained.
After that, you proceed as normal. Hopefully no workbook is ever sadistic enough to give you one that's 7th degree, because that would be rather tedious.

SCENARIO 3D - Irreducible Quadratic Factors (dunnnn)

The above are what to do once you've got it reduced to linear factors. But, if fate is not looking kindly on you, you may find your denominator still quadratic, but irreducible. If this is your destiny, you proceed on, but instead of just an A as your numerator, it will instead be Ax+B/(whatever evil quadratic thingy).
Then, again, you proceed as normal. Though usually on these you'll have some less than pretty denominators still, usually the sum of two squares, but there is a formula for that and it is probably in the back of whatever calculus book you're using.

SCENARIO 4: Shin Megami Tensei - Repeated irreducible quadratic factors
Ugh....math words...make me tired. We need a math vocabulary overhaul.
Anyway.
If these IQFs repeat, you treat it the same as when linear factors repeat, listing each step along the way to whatever power it is.
These typically take up entire sheets of paper and sometimes two lines to write out, so you probably encounter too many of these. But, if you do, have patience, because mis-writing something is where you're most likely to make a mistake here after copying down a number for the 100th time.


And there we go. We now have the complete basic arsenal of integration tools. The next couple of sections are just strategies for deciding how to go about solving a given integral problem, how to use the tables in the back for particularly ugly integrals, and how to use computer programs like Maple and Mathematica that are far too expensive for me, so I'm going to skip over them since there's not a whole of content there.
That, and I have a test on this chapter in a few days and I need to get it over with, so....yeah.
Peace.

Monday, March 14, 2011

7.3 - Trigonometric Substitution

It's been a while, but life has been rather nuts as of late, so I've been maintaining just enough knowledge on these subjects to somewhat keep up during class. I'm on Spring Break now, so I have time to actually go back and look at these chapters and know what's going on.
I would also like to point out that Trigonetric Substitution is not the same thing as Trigonometric integrals. Even though we hadn't had this lesson yet and had not been introduced to the term "Trigonometric substitution," I still got points off for using this phrase when I should've said integrals.
Rawr.
Anyway.

We've taken the integrals of all sorts of fun functions (we put the fun back in functions. Yeah. I gotta use that somewhere.) but the fun has only just begun. In case you've gotten smug with your integral-finding bad self, think about how you would take the integral of a circle.

So if we had to take the integral of the (a^2 - x^2)^1/2, we would run into some trouble. If it were x(a^2 - x^2)^1/2, then we wouldn't have a problem because we could just substitute a^2-x^2 as our u, which would make our du 2x, and we would be on our merry way. But, we are not so fortunate.
The solution is a substitution that textbook seemed to pull out of it's butt, but that my teacher was kind enough to explain. Trig-heads probably had their triangle-senses tingle when they saw the difference of two squares, and they would be right on the money. If we set up a triangle and assume that our a^2-x^2 is part of the pythagorean equation, then it would have to make our hypotenuse a and one of the sides x. The other side would be our original equation of the square root of the above function, since the square of the hypotenuse minus the square of the other side will get you the remaining leg. So, if we set this up and start taking trig functions from it, we can get that x = asin(theta).

This is an interesting substitution method, as it's the inverse of what we've been doing when we substitute. During u substitution, where we would get u = a^2-x^2, the new variable is a function of the old one, since u changes as we change x. In the trig substitution we just did where we got that x = asin(theta), our old variable becomes a function of the new one.

Anyway, the book explains none of the reasoning for getting x=asin(theta) and that really bothered me, so I thought I'd share it with all of you. In any case, now our integral becomes:

⌠√(a^2 - a^2sin^2Θ)
With a bit of reduction...
⌠√(a^2(1 - sin^2Θ)
⌠√(a^2 cos^2Θ)
Which, conveniently enough, we can actually take the square root of and be rid of the infernal square root symbol.
a|cosΘ| dΘ
(The dΘ has been there the whole time, I just forgot to put it.)
(Also, I just found the ALT symbol for Θ. Go me.)
And we are now in familiar territory and can integrate away.
It should also be noted that we can only do this substitution if we assume that our new function is one-to-one, so our Trig function has to stay firmly between -π/2 and π/2.

The book only shows the table of substitutions for what your x would be. This works fine and will get you to the correct answer, but, since they opted not to show the triangle logic of these x substitutions, they don't give you the opportunity to see that you can also frequently substitute away the entire problem. In our example triangle, x does turn out to be asinΘ, but we can also substitute the entire function for acosΘ and skip several steps of reduction. Why they leave this out is beyond me.

In the event that you use this to help out a tricky integral, remember that, if you're taking the indefinite integral, you have to convert the function back to being in terms of x. One of the advantages of looking at it in terms of triangle relations is that you've probably done this work already. If not, you have to draw out the triangle anyway and, if your integral was sinΘ + Θ + C, then you have to look at your triangle and see how each of those trig ratios would be expressed in terms of x.
If you're taking a definite integral, then there's no need to do this because the numerical answer you get will be the same regardless of what terms you use to calculate them. Since you're only after the number, it's irrelevant, but if you want the indefinite integral, you want it to look similar to the function you started with.

A somewhat obvious but still very cool application of this is finding the area of the elipse x^2/a^2 + y^2/b^2 = 1.
Through a little algebra that's a pain in the butt to type down (so I won't) we get to y = (b/a)*√a^2 - x^2.
Using either our little circle to substitute out the radical, or by using their table to substitute for x, we'll eventually discover that our radical can be replaced with acosΘ and that our dx can be replaced with acosΘ dΘ.
Since our elipse is symmetric about the origin, we only have to find a quarter of the area, then multiply it by four. We'll settle for finding the area of the first quadrant, so we'll take the integral from 0 to a.
Subsituting in our new functions, we have to change the boundaries to that of the new guys. When x=0, sinΘ = 0 and thus Θ = 0. When x= a, then then the sine of the elipse's radius is 1, and Θ is π/2, so our new boundaries are from 0 to π/2.
So our new equation is:
(1/4)A = b/a ⌠a^2 cos^2 Θ dΘ.
Through more substitutionary trickery that's a pain to type down without a good math typing program that I'm sure is a Google search away and that I'm too lazy to look up, we eventually find that our integral is πab.
What's fun about this is that, if we assume our two radii are equal (read: we have a circle), then the integral of this circle, or the area of the circle, is πr^2.
And that is the history of our beloved circle formula.
I dunno, I thought that was cool.

The rest of the examples are just a few more specific use cases and showing it using the other substitutions from their table, so I guess I'll leave it at that.

I'm gonna try to catch up over Spring Break, so the goal is one of these a day. I can already say that I may or may not get one done tomorrow, since it's going to be kind of a busy day. Aside from that, I'm hoping to catch back up.

Later.