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.

Tuesday, February 1, 2011

6.1 - Areas Between Curves

There was actually a section before this, but it was basically an entire chapter spent saying "If the integral is weird, substitute parts for u until it makes sense." We skipped over the reading and just did problems from it in class, so I'm not going to go through the whole chapter for now. Maybe some other time if I'm bored and in a calculus mood. So I'm moving on to 6.1.

We've already learned how to find the area under a curve on a graph, so now we're moving on to putting two lines on a graph at the same time and finding the area between them in a given interval. If we estimate it, we can use the same rectangle trick we did for the area under the curve. The only difference is that, instead of f(xi) being the height, the height will be (Assuming f(x)>g(x) between our chosen a and b) f(xi)-g(xi) since that will be the distance between the two lines on the given point. So our approximation would be Σ[f(xi)-g(xi)]▲x.

So, just like with the area under the curve, if we choose n as our number of rectangles, then the area between these two curves is the limit of our approximation as n approaches infinity. Since that limit is the definite integral of f - g, then we can define the area as A = ⌠(a to b)[f(x) - g(x)]dx.
The book also feels it necessary to point out that, if g(x)=0, then we use the old definition, which makes sense because using g(x) as the 0 line changes nothing.

If two lines are given that intersect at two different points, and your a and b are not given, then they can be found by solving their equations. If you have funky equations that would take ages to do by hand, then a graphic calculator or computer program (which I need to look into getting) will work. We can use Newton's Method, a rootfinder, or the super scientific solution of zooming in really close and seeing where it intersects.

For application-minded folk like me, the area between velocity curves is the distance between the cars at a given point, which is pretty cool.
If you get twisty curves where the lines switch from top to bottom and you a get a DNA-looking twist, then you split the area into multiple regions, find them each individually, then add them together. We can also write a slightly modified area equation that say the area between two curves is the integral of the absolute value of f(x)-g(x).

Also, if the two lines are vertical, you can treat as a function of y, which results in the same process, but flipping the whole thing sideways.

And that's pretty much it. Not a terribly complicated chapter, since once I put the work in to understand the whole integral concept, it's pretty much just application and slightly different ways of thinking about it.

Tuesday, January 25, 2011

5.4 - Indefinite Integrals and the Net Change Theorem

We got our review quiz back, and I had a 77 on it. Looking back over it, it was mainly careless errors and forgetting my trig identities, so it's annoying but not devastating. Anyway, on to 5.4

5.3 took a lot of mental effort to process, but, from what I've read so far, 5.4 is just some applications of it, so it shouldn't be quite as taxing. That's a good thing, because I have a quiz to do after the homework for this section. Fun times.

To make it easier to write down, we're using ⌠f(x)dx as the notation for an antiderivative of f(x). Since the integral on a segment is the definite antiderivative, using the integral without a given segment is an indefinite integral, and will be a general antiderivative with a +C. If you have a given segment, the definite integral gives a number - an absolute area. If you use the indefinite integral, you get a function.
We then have a table of indefinite integral formulas, which are pretty much the opposite of the derivative formulas + C, so I'm not going to bother summarizing them.

Also, the indefinite integral is only valid on an interval. It compares it to the general antiderivative, but I don't fully understand the difference it's showing. Something to ask about later.


Now, since ⌠f(x)dx is the antiderivative of the function, then ⌠F'(x) is the derivative of the antiderivative of function, so it's just another way of saying that function. But, looking at it as the derivative of the antiderivative, it becomes the rate that the antiderivative changes as x changes.
So stating our our ⌠f(x)dx = F(b)-F(a) as ⌠F'(x)dx = F(b)-F(a) makes its use in science applications more apparent, since we know that the rate the integral changes is the same as the net change between the interval.

Example: if C(x) is the cost of producing x units of something, then we know the marginal cost (C'(x)) is the rate of change in the cost. So ⌠C'(x)dx = C(x2)-C(x1) would give us the increase in cost from one amount to the other.

There are a few more examples, but that's pretty much all their is to this chapter. A littler easier to wrap my head around it.

Sunday, January 23, 2011

5.3 - The Fundamental Theorem of Calculus

Two semesters into your math degree and we're now going to teach you the foundation of what you've been studying. That explains all the creaking and shaking.

The two kinds of calculus we've been doing - integral differential, seem unrelated at first glance, but, as Newton and his crack team of mathematicians discovered, they're closely related. The two processes are actually the inverse of each other, and that will enable us to not do these long processes from the last two chapters except on tests from now on. At least, that's what I'm hoping.

We start this off by defining a function as g(x) = ⌠(a to x) f(t)dt, where f is a continuous function on [a,b] and x can be either a or b. The value of g is only dependent on x, which is the top number of our interval. If x is fixed, then the integral is a constant, but if x is a variable, then the integral varies and is a function of g(x).
If f(t) is positive, then g(x) is the area under the graph of f from a to x, and x can vary. g(x) is the "area so far," as the book puts it, which I like.

This is the first entry where I'm doing the writing before having the class on the topic, so I don't fully understand what's going on, but I'll write my best understanding of it and probably talk about my clarifications after class.
Anyway, we're shown a curvy graph for y=f(t) and, given that the integral from 0 to x of that function is a function of x, evaluate that function [g(x)] for a series of numbers. We can see from looking at it that g(0) will be 0, and the rest of them can be interpreted as areas of fairly easy geometric shapes. Except a couple of them, which they eyeball to say are about 1.3, because I guess that's okay here.
We plot these points on a graph of g(x). Since the areas switched to negative areas at one point, the graph begins decreasing there and we know we have a maximum. Using an exercise my teacher didn't assign so I had to look up, we know that the integral of a variable function is half of the difference between b^2 and a^2, which, if we choose a as 0 and b as x, we get (x^2/2) for the integral, and thus g(x). 

Now, the book says that we take f(t) to equal t, which I don't fully understand the reasoning behind and will ask about in class tomorrow. But, just taking their word from, if we take the derivative of g(x), we get x. So, we can say g'=f, meaning that g is an antiderivative of f. 
Anyway, if we estimate the derivative of g(x) and sketch our graph out, it should look pretty close to the graph we started with, which confirms our suspicion. 

To make it more mathematically sound than "Hey, those graphs look like each other," we think about any graph where f(x)≥0, so that g(x) (being the integral from a to x of f(t)) is the area under the graph from a to x. If we're going to compute g'(x) using the limit-taking method none of us remember how to do because we haven't used it since section 2, using g(x) and g(x+h) actually results in us subtracting areas. Since we're subtracting the area from the area of h further than our first area, what we really get is the area of the rectangle whose width is h, and whose height is f(x) for that point, or hf(x).
So g'(x) is equal to the limit as h→0, which is also equal to f(x). I don't fully understand this step, but I think it's because I don't really remember this method for taking derivatives. Again, I'll ask about it in class and go look that process up again later.

So we get the first part of the Fundamental Theorem of Calculus. If f is continuous on [a, b], then g(x) (which is the integral from a to x of f(t) as long as x is between a and b) is continuous and differentiable on [a, b] and, more importantly, g'(x)=f(x).
Reworded, assuming the normal constraints of continuity and whatnot, if we take the integral of a function from a to x, and define it as a function of x, then the derivative of that new function is the antiderivative of the original integrated function. As the book puts it, if we integrate f, then differentiate the result, we get back where we started.

This realization allows us to look at principles discovered with integral calculus (Like the Fresnel function, provided by the book as a function important to optics) and let us play with it in all the ways we can do with differential calculus. It's like realizing you can stick other games into Sonic and Knuckles other than just a Sonic game and play new bonus stages.

The next part of the FTC provides a much easier method of integration than chaining together all of the Riemann sums that took forever and made me stay up until all hours doing my homework.
FTC2: The integral of a function from A to B is the antiderivative of B minus the antiderivative of A. Or, if you know an antiderivative of f, then we can integrate the function by subtracting the the antiderivatives at the endpoints.

I must say...that's irritatingly simple.

So the Fundamental Theorem of Calculus is basically 2 parts. If a function is integrated then differentianted, you end up back where you started, and the integral of a function equals any of its antiderivatives at its two given endpoints. Or, integration and differentiation are inverse processes.

Saturday, January 22, 2011

5.2 - The Definite Integral (now with ALT symbols)

The limit we spent 5.1 (the limit of as n approaches infinity of the sum of a function times the change in x for n changes) that popped up in the area under a curve and the distance on object travels apparently pops up in a bunch of other applications later down the road. This name is the Definite Integral.

Definite Integral - For a function f, if it is defined between x values a and b, we can divide it into n sections of equal length [(b-a)/n]. If xv0=a and xvn =b, and xv1...xvn are any sample points within the segment that lie between the actual segments (xv(i-1)) then the definite integral of f from a to b is | ⌠(a to b)f(x)(dx) = Lim<n→∞> Σ(i=1→n) f(xi*)▲x | If this limit exists, then f is integrable on [a,b].

The limit is then plugged into the "precise definition of a limit" which I don't feel like replicating here.
As a side note, the book points out that the elongated s was chosen as the integral symbol because it is a limit of sums.  f(x) is the integrand, and a and b are the limits of integraion. Calculating an integral is called integration, not to be confused with the civil rights movement, though it makes civil rights speeches funny to assume that's what is being discussed.
Side note 2: the definite integral is a number and the symbols are arbitrary. Whether f(x)dx uses an x, a t, or a picture of Pikachu, the value of the integral does not change.
Side note 3: The sum of the right-hand side of the equation is called a Riemann Sum after the German guy who figured it out.

So, we can say that the definite integral of a function is the limit of its Riemann Sum and can be calculated to however closer of an answer you want.
It's a little more flexible than the sum of the rectangles thing through, because, even though it looks like the exact same thing if they're all positive, it changes a bit if f has negative values. When f dips under the x axis, then the Riemann sum is the areas of the positive  parts of the curve minus the area of the negative parts, or, as the book puts it, the net area. So the Riemann sum is Av1 - Av2, assuming A2 is negative and A1 is positive (and delicious).
The book adds another side note that sometimes we don't use equal subintervals , and that you can also define the limit as when ▲xi → 0 instead of as n → ∞. I guess we'll work on that later.

Just to reassure us, the book points out a theorem that, as long as f is continuous or has a finite number of jump discontinuities on its interval, the function is integrable. So, as long as it never stretches to inifnity and leaves a gap in your interval, you're good.

Since the easiest place to take your sample points is usually the right endpoint of the segments and being able to do it from any point in the middle is mainly a parlor trick or a way to break up monotony if for some reason you have to integrate all day, we can redefine the definite integral so that the Rieman Sum is from i=1 to n for f(xi)▲x if we're using segments of equal length.

The example problem demonstrates that, most of the time, when rewriting a Riemann sum as an integral, we just replace the Limit and Sigma symbols with the Integral symbol, the x with the star above it with just x, and the ▲x with dx.

Since we're going to be given Rieman sums or Integrals, then asked to evaluate them, we lay out some ground rules to work with them that will save you hours of tinkering with the limit-taking process. I'm not typing them out mathematically, since I don't have the ALT codes memorized yet and it wouldn't do me much good. Instead, I'm going to try to summarize them in words, since I just had to go look up Sigma notation to figure out exactly how to understand what the heck I've been reading. So, here are the formula (formulas? Formulae? Formuleaux?) for dealing with sum.

1. The sum of n number of integers is half the product of n and (n + 1).
2. The sum of the squares of n number of integers is 1/6th the product of n, n+1, and 2n+1.
3. The sum of the cubes of n number of integers is the square of the sum of the integers formula.
4. The sum of n number of the the same constant is n times the constant.
5. The sum of n numbers of a constant times a function's value is the same as the constant times the sum of the functions. (The n can be factored out by the distributive property)
6. The sum of two series of numbers is the same as the sums of each of them individually, added together.
7. The sum of the difference of two series of numbers is the same as the difference of each of their sums. (That doesn't make a lot of sense written out. If you heard me say it out loud and point at it, it would totally make sense.)

A couple of examples demonstrate how to evaluate limits, and we move on to a section called The Midpoint Rule.

Most of the time, the right endpoint of the ith segment of an interval is the easiest choice for i to compute the interval. But sometimes we want to find an approximation (Instead of an exact value which could be found with the right endpoint. I'm sure the reasoning for this will be apparently later, but it seems weird now.) The symbol for our sample point is an i with a star above it, but the midpoint is denote by x, with a subscript of i, and and line over it, becuase they want this to be as annoying as possible to type about.
When using the midpoint, we use the definite integral, but ▲x is is .5(xv<i-1>+xvi), or the point that is in the middle of each segment. Through the example problem, they show that using that method on an earlier example gets a much closer estimate for the chosen n than using the right endpoint.
So, if you don't want to bother evaluating the integral, using the midpoint of the segments is a better estimate than either of the endpoints. Two chapters from now we'll apparently learn how to estimate the error and learn some new ways to approximate an integral.

The next section develops some basic properties, which I will once again summarize instead of trying to type.

1. The integral of a constant function is the constant times the length of the segment.
2. The integral of the sum of two function is the sum of the integrals of the two functions
3. The integral of a constant times a function is equal to the constant times the integral of the function. (The constant can be factored out)
4. The integral of the difference of two functions is equal to the difference of their integrals.
5. The sum of the integrals of two adjacent segments equals the integral of the entire segment.

I'm not sure why the book decided to stick number 3 between 2 and 4. Whatever. Pretty straightforward.
Also, my book has a typo, I believe. For rule five, they have listed that the integral from a to c plus the integral from c to b equals the integral from a to b, which doesn't make any sense. My teacher walked through it and wrote it down in the way that made sense, so I'll double-check this with her, but I think the book is wrong here.
Oh, just after writing that, I looked more closely at their diagram, and they just decided to label the segments weird. With the way they labeled them, their formula works. Why they they made c the point in between a and b is a mystery to me. Maybe I'm just getting tired and overthinking this.

Those properties were true for any comparison of a and b (though I don't see how the adjacent sections property. There a few more properties that only work if a ≤ b and x is between them or equal to them.

6. If f(x) ≥0 then the integral ≥ 0, or, if the function is positive, the integral is positive.
7. If f(x) ≥ g(x), then the integral of f(xdx) ≥ the integral of g(x)dx. Big functions have big integrals. Little functions drive big cars to compensate.
8. if m ≤ f(x) ≤ M , then the the integral lies between m times the segment length and M times the segment length.

Property 8 is referring to the absolute minimum and absolute maximum, which the book decides to explain after listing it all and pretending this is perfectly standard notation and wondering why you'd ever be confused by this.
Anyway, Prop 8 (ha) says that the integral is going to be bigger than the area of the rectangle taken with the height of the absolute minimum, and smaller than the area of the rectangle made with the height of the absolute maximum. Not entirely sure why this is useful knowledge, but I'm sure it will be obvious later and I will regret doubting the wisdom of their theorems, since we've all pretty much been doing that since we wondered why we would EVER need to know how to do fractions back in Grade School.
Well, according to the book, it can be used for a quick estimate if you don't feel like using the midpoint rule. Okay, sure.


Oi. Finally done with this section. It's late and I'm tired, but I'm gonna try to do at least some of the homework before class on Monday and I know I won't get any done tomorrow. I may try a little tonight, or I may just wake up a little earlier tomorrow and try to do stuff before church and socializing takes over the day. But I probably won't, because I know that when I wake up early tomorrow homework will be the last thing I want to do. I guess I'll dive in, and probably try to finish anything I don't get done on Monday before class, since my 7 AM class won't be meeting that day.

Okay, good night.

Friday, January 21, 2011

5.1 - Areas and Distances

Chapter 5 begins with Integrals, which, according to DBU at least, separates Calc 1 thinking from Calc 2 thinking. I remember ending last semster with integration, though I don't remember much of the technique behind it. So, note to self: Refresh integration technique.

So we want to know the area under a curve of function. Given the vague function y=F(x), we see the area that is encased between the origin, the curve, and within given stopping points A and B. Since the sides are all curvy, it's not as quick to figure out as straight shapes like squares, triangles, etc. So we have to come up a precise, mathy definition of what an area means.

We figured out the definition of a tangent line by taking two points - the point we wanted the tangent of, and another point - and moving that second point closer and closer to our tangent point. The slope would keep approaching the slope of what the tangent line would be, so the limit of the slope was the slope of our tangent line. We're going to do pretty much the same thing to get the area under the curve, but with rectangles.

Example
We're given the curve y=x^2, and want to know the area under in from 0 to 1.

By making vertical lines from an X value every 1/4 distance (1/4, 1/2, 3/4, 1) we cut the area into four rectangles. We decided the width was going to be 1/2, and, since the length is how far from the origin to the line, the length will be f(x) for whatever point we're on.
We can extend these lines into full rectangles and add the area of all of them, which, in the example, comes out to .46875. We know that's too much, so we cut the rectangles' widths in half, doubling the number of them. We have to decide whether to use f(x) as the left end of the rectangles or the right end, which results in us either overshooting or undershooting our answer.
The smaller we make the rectangles, the closer we get to the actual area of the curve. Just looking at the numbers from the example, it looks like we keep getting closer and closer to 1/3 as our area.

Example 2
So let's see.

We're going to call Rn (there's not really a convenient way to write subscripts in basic HTML. Oh well.) the sum of all of the areas of the rectangles in our area. If n is the number of rectangles we're using, then the area of each will be (1/n)x(1/n)^2 + (1/n)(2/n)^2 since (1/n) is the width we chose, and we're increasing it by 1 and squaring it each time to get the length.
We apparently have a formula for how to summarize the sum of the squares of first n positive integers, mentioned casually as if I'm supposed to hold every formula I've seen since Algebra 1 in my head forever. I'll look that one up later, and take their word for it now. Anyway, this formula is [n(n+1)(2n+1)/6] Multiplying that by the 1/n^3 we pulled out of our series, we get [(n+1)(2n+1)/6n^2].
While taking the limit of that, we can separate it into three separate fractions: (1/6)[1+1/n][2+1/n]. If we let n go to infinity, we see the limit becomes 1/3.
Since the limit of the sum of the areas of rectangles inside this curve is 1/3, we know that the area of the space under the curve is 1/3. Yipee!


So we go back to our weird curvy thing at the beginning of the chapter. To get general principles from it, we're labeling everything with variables. So we take S, the area under the curve, and divide into n strips, which we label Sv1 (little V is a subscript now. It's like squaring^, but pointing down. Deal with it.), Sv2, all the way to Svn, and assume they will all have equal length because we don't need to make it hard on ourselves unless we're looking for something fun to present a paper on.

a and b are the endpoints of our interval, so if we're dividing it up into n equal segments, the width of these will be (b-a)/n, or (Delta)x. Since we're starting at a, the actual points of the rectangle segments (assuming we're using them as the right ends) are xv1 = a+(del)x, xv2 = a+2(del)x, etc.
So the sum of all of these rectangles will be the width(which is our delta X) times the hight (which is the value of the function at xvn.) and we substitute the values of whatever problem we're working on.
Since the estimate gets better the more rectangles we have (the higher the value of n), we can define the area under a curve as the limit of Rvn as n approaches infinity. It also works for the left endpoints, so Lvn also works. It then shows that we can say "screw endpoints!" altogether and start at any sample point, and the theorem still works. The symbol for "any sample point" is xvi with a star above the i. I wonder how long it will be before we run out of symbols completely.

Since that takes up a lot of room, we can use the sigma notation of (sigma from i=1 to n) [f(xvi)](Del)x. Much better.
---
The next example just work out a problem, so I'm not summarizing that.  Next is the Distance Problem.

We want to know how far something went in a given time if its velocity kept changing, like someone texting while driving. If you graphed it out, you'd get a curvy graph like the ones we just figured out the area of.

Example 4
A car's odometer is broken and the poor OCD math major who owns the car can't get it fixed yet, but has to know exactly how far he went. He's not car-savy enough to fix it himself, the shop kids still give him wedgies, but he is smart enough to get a device running to capture the exact speed he was going every five seconds.
I'm not recreating the table here, but every 5 seconds we get speed readings. Take my word on the values.

Seeing that the velocity doesn't change drastically during the 5-second intervals, we're going to pretend we were going exactly as fast as the first interval says for the whole 5 seconds. So if he went 25 ft/sec for the first five seconds, he covered 125 feet. The next interval has him going 31 ft/sec for the next 5 seconds, so that adds 155 feet. If we do this for the whole table, we end up with an estimate of 1135 feet. We can also do this  using the speed at the end of the 5 second period instead of the speed at the beginning, which would give us an estimate of 1215 feet.

Lo and behold, we are actually taking equal distances on the x axis, and multiplying them by their value where they meet the graph we'd make from the points. This sounds suspiciously like what we were just doing.  Sure enough, if we plot the points we figured out and make a rectangle out of the y values, it looks just like what we were doing. The area of the rectangle under a segment is roughly the distance traveled.

So we can re-write our "area-under-the-curve" formula to be a "distance-traveled-by-weird-speeds" formula by making (del)(t) instead of (del)(x)and f(tvi) instead of f(x). Since measuring the time more frequently makes smaller, and thus more, rectangles, the limit of the above equation as n approaches infinity is the distance travelled by the thing we're tracking. Or: The distance traveled is equal to the area under its velocity function.

The book assures us that the area under a curve ends up representing all kinds of fun things later on.
Meanwhile, the nerd with the broken odometer, if he managed to avoid careening into oncoming traffic while figuring this out, completely geeks out, pulls over to the side of the road, writes an Android application to do these calculations and replaces his odometer with it, resulting in him being late for the first date he'd gotten in years.