Showing posts with label calculus. Show all posts
Showing posts with label calculus. Show all posts

06 March 2011

You'll Need to Go to the L'Hospital After This Pun

Today we're going to talk about how to solve tricky limits and I'm going to bust out my trusty calculus book for examples! Disclaimer on the previous post applies, with an addendum: you will probably be really confused unless you actually are at a calculus level.

First let's talk about some RULES that govern limits. Like with all things in math, there's stuff you can and can't do. Here's what's valid when working with limits:


The limit of two functions being added is the same as the limits of each function taken seperately and then added together. This is like distributing the limit operation through the function.

The same thing applies with subtracting limits.

Example:



Constants can be pulled outside of the limit and the limit calculated independantly of the constant.

Example:



The limit of the product of two functions is the same as the product of the limits.

Example:



Same as above, but with division.

Example:


THEN we have to discuss INDETERMINANT FORMS. Ugh does it never end?! EVEN MORE SETUP INFORMATION:

Indeterminant forms are things you get when evaluating limits THAT TELL YOU NOTHING. If your limit ends up being in an indeterminant form, you need to rearrange it until it's not. (I'm not working off a list here like above so if I forget one of the forms, let me know and I'll add it.)
Indeterminant forms:





All of these are indeterminant forms because you can't tell, for example, if the top is approaching 0 faster than the bottom is approaching 0, or if the positive infinity is getting bigger faster than the infinity being subtracted. Basically, you can't tell what's going on.

And some quick points of reference. When dealing with limits if you have a variable on the bottom and a constant on the top, and

Why is that true? Well, you know how when you plug something like 1/x into your calculator, you get asymptotes at 0 where the function goes off to infinity? That's because as your denominator gets infinitely smaller (closer to 0), your function gets infinitely larger. Same thing in reverse for the other bit: as the denominator gets larger, the function gets smaller. Plug some values into your calculator and check it out if you don't believe me.

There. Now that all that's out of the way, we can talk about solving this shit.

We'll start with something easy:


"GUINDO. THAT IS NOT EASY."

Shut up, you whiner. Look at it. Plug in 2 and what do you get? 0/0, which is indeterminant, right? Well, the first thing you gotta do is figure out how to make it NOT indeterminant, and one way is by algebraic manipulation.

So let's take a closer look. We have a second degree polynomial on top and a first degree polynomial on the bottom, so your first thought should be "I wonder if this factors." If you can factor something from the top that cancels with the bottom, your indeterminant form will go away and you can solve the limit.

If you don't know how to factor, GET OUT. I'll cover that in a later post.



Awww snap, there we go, the x - 2 drops right out. Remember the footnotes on the last post where I said why you can do that even if the function you're "cancelling" is zero at the point you're using? If not, go back and read it and quit skipping ahead like a jerk.

So now it's simple enough to evaluate directly and we have our answer:


Let's evaluate something a little harder. This is one of my favourite techniques: factoring stuff that doesn't exist!


Aw man, this one is DEFINITELY infinity over infinity, AND it doesn't even factor! What are you supposed to do?!

Cheat.

Factor out the highest degree polynomial from both the top and the bottom.



"HOLY SHIT GUINDO ARE YOU FUCKING KIDDING ME THAT'S CRAZY"

Crazy enough to work!

This technique is the best. It's so simple and so easy to remember. And it works because if you distribute that x2 back through, you get the original function. There is absolutely nothing wrong with doing this, but it's so sneaky!

Simplify:


And evaluate:




IT'S SO SIMPLE. Fucking amazing, you guys. If you're ever in a bind trying to figure what the fuck you're supposed to do with a polynomial limit, TRY THAT FIRST. You don't even have to bother with figuring out your factors like in the previous example. You can even do it for stuff with ex by factoring out the highest degree of e!

Of course there's the caveat that this only really works when you're going to infinity. Fortunately most limits are either infinity or zero! And zero limits don't become a huge thing until derivatives and multi-variable calculus. AKA outside the scope of this post.

But, y'know, books like to be inconvenient, so. Just remember: algebraic manipulation should be your first resort if it's not going to infinity, and cheating should be your first resort if it is.

One more thing for this post, which is the CALCULUS part of it: L'Hospital's Rule.

It's pronounced Low-pee-tall by most professors but I like to say Luh-hospital just to shake things up.

Luh-hospital's rule says that if you're evaluating a quotient of limits, the rate of change for each function is proportional to the limit itself. Or...something like that, anyway. Basically, if you have an indeterminant form that's either 0/0 or ∞ / ∞ then you can take the derivative of the top and the derivative of the bottom and evaluate the limit of the quotient of...you know what let me just show you.



The first step evaluates to infinity over infinity. The second step takes the derivative of the top and the derivative of the bottom and compares those instead of the original functions, and that evaluates out to 0. This is possible because good ol' Luh-hospital figured out that when you're comparing the limits of two functions like this, comparing their rates of change was the same thing. You can go back and try the other examples using this method to see how it works.

Now I want you to use your imagination. Really picture this. A big flashing neon sign with sparkles everywhere and maybe a rainbow somewhere and there's definitely an angry unicorn giving you a stern glare off to the side and the sign says:

DON'T USE L'HOSPITAL'S RULE UNLESS YOU HAVE 0/0 OR ∞ / ∞ UNLESS YOU WANT TO GET AN F ON EVERY TEST FOREVER


And we're done.

Next time: I never get tired of talking about limits.*





* Unless it's epsilon-delta proofs. Fuck epsilon-delta proofs.

28 February 2011

A Limited Introduction To Continuity

I think you actually get introduced to limits in algebra II or pre-calculus, but I'm tagging this as a calculus post because that's where they stop being an obscure concept and start having meaning. Feel free to read this if you're only up to algebra, it should still make sense.

You won't understand this post if you don't already know algebra ideas, however. Sorry! We'll get there eventually and then you can come back to it.

So, what are limits?

The most basic explanation is that a limit is the behaviour of a function as it approaches a certain value. What does f(x) do as x approaches infinity or zero or 4?

Why is that important? Why do we need to know if f(x) is going to infinity or whatever? First of all, continuity. Secondly, the definition of derivatives goes back to limits, and FURTHERMORE, since differential equations model actual real-life scenarios, it can tell us what to expect the outcomes of those scenarios to be.

The last two are outside the scope of an introduction to limits, ESPECIALLY if I'm framing this at an algebra level, so let's talk about continuity.

"Dudes already know about continuity!!"

Whatever I'm explaining it anyway. Continuity basically means there are no holes in the graph of a function. If you put your pencil down at the far left side of the graph, you can get to the far right side of the graph without ever lifting it.

The mathematical definition of continuity at any point is:



This actually says a few different things:
1. The limit exists, which means:
2. The limit from the left and the limit from the right are equal to each other
3. The limit as x approaches a is equal to the value of the function at x = a

Let's do this with a simple function first to give you an example of what I'm talking about. Here's the graph of F(x) = 2x+1:



It should be easy enough to see that this graph is continuous. F(x) will exist for any possible x you might pick, anywhere from -∞ to +∞. So how does that fit in with our definition of continuity?

Let's try a limit with a at specific point. What does the function do as x approaches 0? In this case, we can just plug in 0 to see what happens:





The limit exists at that point, and it is equal to the function at that point, which means F(x) is continuous at x = 0. Pretty easy!

What happens when you pick a number you can't plug in, though? Like, say, INFINITY?



Infinity's not a number. It's an idea. You can't plug infinity into 2x+1 to see what you get. What you CAN do is look at the graph to figure out what it's doing as x gets infinitely larger. In this case, as x increases, F(x) is also increasing. It will keep going up and up and up on that cartesian plane FOREVER because there is nothing to stop it. Thus, the limit is also going to be infinity:



That should pretty much be self-evident. It doesn't MEAN a goddamn thing for this particular function, sadly, but it's an example of how to take limits to infinity.

Let's try it for a function that's NOT continuous for all values of x.




This graph has an asymptote through x = 1. Let's look at how that discontinuity works with the graph's limit.



We can't just plug in 1 here because HOLY SHIT DIVISION BY 0 so don't do that you'll wreck the universe or something. (spoilers: I'm going to blow your mind later by dividing by zero.)

What you have to do in this case is take the limit from both sides. If the limit from the left and the limit from the right are equal to each other, then the limit exists. If they're not equal, then the limit does not exist, which means you can write a big fat DNE on your assignment.

Remember that whole number line thing? Imagine 1 on a number line. Now imagine you're running at it from the positive direction: starting at the rightmost side of the number line and sprinting toward 1. We'd write that as:



How do you figure that out? Plug in a bunch of numbers that are greater than 1 but closer and closer to it. Tables are very helpful for this:



xF(x)
1.91.1111
1.0911.1111
1.009111.1111


As you can see, the closer we get to 1 from the right, the bigger F(x) is getting. You can keep plugging in values for x until you're satisfied, but I'm gonna say this limit is +∞ and call it a day.

Now we do the same thing for 1 from the left. Start running toward 1 from the negative direction and see what happens.





xF(x)
.009-10
.09-100
.9-1000


Looks like this one's going to -∞ the closer you get to 1. So it's positive infinity from the right, but negative infinity from the left, which means...



Whoops! Limit DNE!

Since the limit at 1 doesn't exist, because the limits at 1+ and 1- aren't equal, that means the function is discontinuous at x=1.

But there's two different ways to make a function discontinuous according to our definition. We've only proven the first way: if the limit doesn't exist. Let's take a look at the second way: if the limit as x approaches a is not the same as F(a).

We'll use a removable discontinuity for this one. That means you can rewrite it as a continuous function with algebraic manipulation.




This can be re-written as:





Since you can factor an x - 1 from the top and cancel it with the bottom, that means the function is continuous, right? Well, let's take a look:







So our limit is 2, right? Right! The limit exists and it is 2 as x goes to 1. In order for the function to be continuous at x = 1, however, the original function must also equal 2 at x = 1.



Whoooops division by zero! F(1) doesn't exist!

BUT WAIT! Why can't you just cancel it like you did before, Guindo?

That's actually a very good question, and it is a common error. Let's take a look at why that doesn't work for this particular value of x.



For any non-one value of x, it's true that will be 1. But there's a very important rule to remember when you try to substitute a value in there.



You still can't divide by zero. When you cancel a fraction like this, what you're really saying is that its value is 1 so continuing to write it would be frivolous. But is not 1, it's undefined. So our limit is 2, but F(1) DNE.



So the graph has a hole in it at x=1, and the function is discontinuous.

Gosh this limits post sure got long, didn't it? We've sufficiently covered continuity, at least; I can talk about calculating tricky limits and indeterminate forms next time.

Oh, wait, there is one trick that math books like to throw you about continuity: using piecewise functions to ask if something's continuous. This is actually really easy to tackle if you keep the definition of continuity in mind.

I'm going to use our last example for this one, since we already did the work of finding the limit, and give it a specific condition as a piecewise function:



If x is NOT 1, then the top line is what we graph. If x IS 1, then the bottom line is what we graph. In a case like this, what the writer of the problem is really asking you to do is take the limit as x approaches the value where the piecewise function changes, and then make sure the value of the function itself is equal to the limit at that point.

We've already done this, so we know that the limit as x approaches 1 is 2, and since the piecewise function says that F(1) = 2, the function is continuous at that point. Math books do this to try to trip you up, but if you have an understanding of continuity based on limits, it's just a cheap trick.

Next time: Indeterminant forms and fun ways to bend the universe around limits






* Graphs supplied by this fine website. Code...well, that's in the sidebar now, isn't it?
** Why can we cancel (x-1)/(x-1) for the limit but not when we plug it into the function? When you take a limit, you're only looking at it's behaviour as x GETS CLOSE TO a. You're not actually taking its value AT a. That means a limit as x approaches 1 will never have x EQUAL 1, so (x-1)/(x-1) will never equal 0/0.