Wednesday, July 27, 2011

Game Theory, and a change of pace.

Over the summer, instead of going back through my Calculus book like I planned, I've been going through other math related books (One on cryptography and one on Game Theory.) For the Crypto book I did no journaling (as it was more biographical than instructive) and for the Game Theory book I've been journaling in a pen-and-paper notebook like a caveman (parenthetical statements are AWESOME.)
Since journaling has proven itself to be so useful to me, I think I may migrate all of my math-related journaling to this blog and may end up changing the name of it. The only reason I hesitate to do this is because, even with all of the ALT codes memorized, writing mathematics on a computer is a pain. But, I have recently found the wonder that is LATEX! (the math writing language. Not the other wonders of latex. Though those are nice too.)
So now I can do this!

$2^{a_k} + t_{n_1}$
Booyah!

So I am migrating all of my math-related journaling onto here. I'm a little over halfway done with this game theory book, and I may or may not move the previous journal entries here. It'll depend on how bored I get later.

Thursday, May 26, 2011

6.3 - Volumes by cylindrical shells.

Well, school is out and summer has begun. So I don't let the math part of my brain completely atrophy over the summer, I'm going to go back and fill in the blanks I left during the school year, and then I'll find something else math-related to write about.

I skipped over blogging 6.3 because things got chaotic around that time due to losing a week of school to snow days. So let's take a look at what we missed.

We were talking about finding the volumes of shapes you get by rotating a curve around a given line. We did this by cutting out disc or washer-shaped chunks out of shape by taking a slice that is perpendicular to the axis of rotation. That's all well and good, but we run into a problem if we take a curve like y= 2x^2-x^3. I don't really think there's an easy to draw on Blogger, so use your imagination or plug it into a calculator.

We could technically use the last method to solve this, but figure out the radius of the inner washer, we'd have to solve that equation for x. That's possible, but...ew.

But don't worry, because there's another way to go about this.  When we were making the discs, we took a chunk out that was perpendicular to the axis of rotation. This time, let's take out a section that's parallel; from the top of the curve to the base. If we take out that section of a given width from the entire shape, we get a shell that looks like a thick tin can. Since this is a cylinder, we know that if we can find the volume of the entire section, and only take the thickness of the rim (subtract the volume of the big empty part) then we'll have the volume of the shell. Formula-wise, we'd have "(pi)r^2h - (pi)r^2h" (r of the first and r of the second, respectively. I don't know a good way to do subscripts.) With a little algebraic finagling, we can reduce that down to [2(pi)][(r2+r1)/2]h(r2-r1).
Since r2-r1 is the amount of change between the two radii, we can just call it ▲r.
So, we can boil it down to V = 2πrh▲r, or, as the book puts it, the volume is the circumference times the the height times the thickness.
(Remembered the pi code.)

So, let's try this on our scary little curve. We'll take a interval out of it (from a to b) and divide it into some number of equal intervals (n).  We'll call the width of these intervals ▲x, the middle of it will be x (Italic x. I don't know how to put the line over it like in the book.) So we'll make a rectangle with the width ▲x and height f(x). Now we'll take that rectangle and spin it around the y-axis. When we do that, we get a neat little cylindrical shell that looks just like the one we were talking about earlier. We can say its average radius is the midpoint of the interval, it's height is f(x), and its width is ▲x.

If we take the sum of the volumes of all of the shells made from our intervals, we get somewhat close to the volume of the shape. If we keep splitting it up into more and more intervals, the estimation gets better and better. So, it seems reasonable to think that the limit of the sum of the volumes as n approaches infinity will be the volume of this shape. This turns out to be true, but we can't prove it yet with the stuff we know.

So, if we don't want to use the disc/washer method, we have a new formula.
V= ⌠(from a to b) (2π)x(f(x)) dx

So there we go. If the disc fails you, try the shell.

It's good to be back.

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.

Saturday, February 26, 2011

7.2 - Trigonometric Integration

Last time (on Dragonball Z...) we learned a neat little formula that we could substitute parts in to help evaluate more complicated integrals, and God bless whoever figured that out. There are still some integrals, mainly with more complex trig functions, that don't quite work. For example, if we have
⌠cos³x dx, then the only real substitution we could make would be to set u to cos x. If we did that, our du would be -sinx, which doesn't help us because we don't have one in there to get a du out of. If we want to integrate with cosine, then we have to have a sine function in there to make our du work, and vice versa with integrating a sine function.
But, being the clever mathematicians we are, we can take out of the cosine functions and call it cos²x(cos x). We know that cos²x = 1-sin²x, so this becomes (1-Sin²x)(cos x)dx. Now that we have sines and cosine, we can set u=sin x and get (1-u²)cos x dx. Now that our du is cos x, we get ⌠(1-u²)du, which is perfectly doable.

Since, as I said in the last entry, I'm pressed for time and need to get on with it, I'm going to jump straight to the strategy summaries.

For sine and cosine functions:
1. If the power of cosine is odd, save one of them out and change the remaining even powers of cosine to powers of (1-sin²x), set your u to sin x and du to cos x, and go from there.
2. If the power of sine is odd, save one of them and change the remaining to (1-cos²x) and do the same as above.
3. If both of them are even, use the half-angle identities instead in whatever path you feel works best.

For tangent and secant functions:
1. If the power of secant is even, save a factor of sec²x (make sure you're saving a squared factor, not just sec x, which isn't terribly useful) change the rest to a power of (1+tan²x), with u as tan²x and du as sec²x.
2. If the power of tangent is odd, pull out a (sec x)(tan x) then use (sec²x-1) for the rest of them, then set your u to sec x and tan x as your du.

For products of sine and cosine functions with constants A and B:
1. sinAcosB = .5[Sin(A-B) + sin(A+B)
2. sinAsinB = .5[cos(A-B) - cos(A+B)]
3. cosAcosB = .5[cos(A-B) + cos(A+B)]

The last three weren't proven in the textbook, but he promises that you get that if you solve with integration by parts, so I'll just take his word for it.

That's all for now. I might go back into more depth later, but I have a crapton to do.

7.1 Integration by Parts

There's still a few back in chapter 6 I didn't get to, but with the psychotic weather we've been having and the subsequent schedule adjustment, we've been skipping around and passing on entire sections. I'll go back and do the other parts eventually, but for now I have to press on.

First off, we learn Integration by Parts.
Since the fundamental theorem linked together integration and differentiation, each rule we've learned for differentiation must also have a corresponding rule of integration. The Product Rule of differention (d/dx(f(x)g(x) = f(x)g'(x)+g(x)f'(x)) is mirrored in Integration by the rule of integration by parts.

The above formula for the Product rule, when substituted for integration, can be stated a few different ways:
⌠[f(x)g'(x)+f'(x)g(x)]dx = f(x)g(x)
or, since the integral of products is the product of the integrals,
⌠[(f(x)g'(x)]dx + ⌠[f'(x)g(x)]dx = f(x)g(x)
and we can re-arrange this a little further to say that:
⌠[f(x)g'(x)dx = f(x)g(x) - ⌠[f'(x)g(x)dx]

That rearranged version of it is the formula for integration by parts. Since that's quite a few letters in there, we can make a little prettier by substituting it for other terms. So we'll say f(x) = u, g(x) = v, and thus f'(x) = du and g'(x) = dv.
So we can restate our formula in the easier to read
⌠u(dv) = uv - ⌠v du

I think that people did it like this just so it would be annoying to write for people whose handwriting is not precise enough to readily tell the difference between u and v.

In general, when you get an ugly-looking integral, pick one of the parts of it to be u and another part to be dv. Find your du and v, then plug it into the above formula and you'll be able to integrate. You may have to loop this several times to end up with your answer, but it works. There are more details but I'm kinda pressed for time so I have to move on 7.2.

Wednesday, February 9, 2011

6.2 - Volumes

Another fairly short section, since this is the last section in 3D.

The chapter starts off reminding us what a cylinder is, in case you slept through middle school. They also introduce the term "Rectangular parallelepiped" which is a really pretentious way to say "box" because too many people started the chapter knowing what they were talking about.

But if we don't have an easy shape like a cylinder where we can just figure out the information we need from the axes, and instead have the weird-looking slug thing they want us to find the area, we do it similarly to how we find areas, only with cross-sections instead of rectangles. When we slice out a cross-section, we can call it a cylinder with the area of the section and a height of ▲x. Whatever ▲x we choose, if we add up all the cross sections, we get an approximation of the volume the object.
The approximation gets better and better as the number of cross-sections get higher, so, it stands to reason that, just like with our rectangles, the limit of the approximation as the number of cross sections approaches infinity is the volume.

The rest of the chapter just shows a few example problems, as well as proving with Calculus that the volume of a sphere is (4/3)πr^3. The only other main idea the examples show is that if, when rotating around the given axis, you get a shape with a hole in it, you just subtract the volume of the empty spot (found by treating as its own object) from the volume of the outer object.
Then, if the shape cannot be cut into disks, cut it into shapes that work. They showed a square-bottomed pyramid and a wedge cut out of a cylinder. Basically, find how to figure out the volume of a cross section, and use it instead.

Fairly short. Not too bad. The equations they used for the non-cyllindrical shapes were a bit confusing, but I think I'll figure out while working out some of the problems.