more importantly today is the day before the midterm so okay it's okay midterm is going to be very easy you're my good students because you actually showed up so I'm very happy about that uh and so I will of course just quickly go over everything that we've done so far this term uh and you'll see really in the end we've only done a few things you know I mean it seems like oh go every week we have homework and you have to do it and that's brutal right okay but really we haven't learned that much and it's going to be very easy when you get to the midterm just see in fact I'll try to do a problem at least from the derivative side covers everything we've done or at least some portion of everything we've done okay today is just okay so before we get to the derivatives let's start off with what we started off with I think I started off with that's about the first thing I did in this course after that we did limits okay so what was the limit right well we have all these functions flying around that we learned in pre-calculus okay some of them are very very nice some of them have little ASM tootes some of them do some weird things right we saw some functions with holes them holes in them and a way to really talk about these functions and what kind of behavior they have is with the language equs so for instance you might have some function it's proceeding along nicely and then oops it jumps up right so say that oops occurs at some point a and say the value that this function should have taken on a a was one and the value that the function actually takes on is two and then we Define the notion of a limit at least in an intuitive way right but the way we did it was by defining first what a one-sided limit and then using the one-sided limit to get the limit so first I actually have to put a symbol up here right I can put a minus or I can put a plus okay the minus means I'm coming from the left side and the plus means I'm coming from the right side right because this is where the minuses live and this is where the plus fine what are these limits well as I'm coming from the left side right we look at what this function is targeting right what is it trying to get to what should it get to and clearly well there's that little dot there at one so we say fine the limit is one right in our analogy with military operations okay you're targeting you know the weapons Factory that's what it's supposed to be doing does it actually get there no if you fired it would miss but we don't care we only care about what you were targeting fine so this limit is one right that's what this function is targeting from the left from the right uh oh it's targeting two it happens to hit two but we don't care all we care about is what is it targeting okay so that's that limit and now we can talk about the two-sided limit right and what is the two-sided limit here does not exist right why because the one-sided limits do not agree okay you have two generals they're deciding who you're going to Nuke okay one of them says we need to Nuke the first weapon Factory the other on has got to the second weapons Factory since they can't agree they can't fire the weapon okay so this does not exist on the other hand if we move this function down a bit so that instead of jumping right it just misses this point and jumps up the limit from the left is still the same right still hitting one the limit from the right right however is now one okay the generals now agree so they can fire they miss right what did they hit they hit two okay but we don't care right as far as the limit is concerned we're happy that they could fire okay and what did they agree on they agreed on one so the two-sided limit is going to be a one okay now this is not equal to F of a so this implies f is not continuous at a okay so continuity meant not only do they agree on a Target so that they can fire but they actually hit the target right since this one doesn't hit the target right it actually jumps up to two it's not continuous at that point so our definition for continuity was F is continuous at x = a if the limit as X goes to a of FX well it should exist right meaning the two sided the two one-sided limits are the same and it should actually equal right the value of f right that's what the target is okay the target should actually equal the value so here it doesn't but if we move this dot down okay then it would then it would be continuous so that was our definition of continu okay now we had a lot of fun playing around these limits right trying to see how they evaluated now with most of the functions we had in this class they were continuous and and what continuous means is if you want to know what the limit is you just plug the value into the function right so as long as you have continuity you can just plug it in no problem okay but where do we get a problem well we get a problem for instance when we try to do things like the limit as X goes to a of x^2 - 4 X goes a x goes to minus 2 of x^2 - 4 x + 2 okay these are two very nice functions they're pols so this is a rational function normally irrational functions are continuous except where when the bottom is zero right right that's how you get a a problem in the domain of the function right a rational function the only way you get a problem is if the new the denominator is zero okay sure enough right this has a problem at minus 2 and so as X goes to minus 2 right right we can't just plug it in because then we get a zero in the denominator okay fine so this means it's not continuous at xals min-2 so we have to play a game right what was the game we played well you try to manipulate your function right do some algebra to it okay the first trick that you're always looking for is canceling okay can you factor out and then cancel in this case we'll be able to do that right the top is x - 2 * x + 2 right using the difference of squares formula we divide by x + 2 ah we see on top and bottom you have X+ 2s we're allowed to cancel because in a limit we never actually let X be minus 2 right after we can so we're just left with the limit as X goes to- 2 of x- and now we do have a continuous function right there is no domain problem here so we are allowed to just plug min-2 in and so we get -2 -2 which is-4 okay then we see some some harder ones let's say we put an X over three here and we'll do a square root of let's say x uh what should we put in here how about oh I don't want to do that let's put a oh that'll be fun xus okay x + one and we put a minus two down here and what should we put on top no ideas let's say uh how about where should we put about x² - 9 how about that doesn't seem like a good idea you got to learn to work these backwards if you can create these problems then you can solve them okay so what would I do here well first thing I see is I have a difference of squares right that'd be really nice I just Factor it and then cancel but you know you know what you're going to get x - 3 and X+ 3 and there isn't one of those on the bottom so what should I do ah multiply by the conjugate right so the the factoring trick you can immediately see is not going to work so the next thing in your little your decision CU is ah let's try multiplying by the conjugate right which makes sense in this case okay and why would you do that well we know when you multiply by the conjugate you're going to square terms right which means square roots are going to go away that could be good so let's multiply top and bottom by the conjugate right which is the same expression but with a plus okay so let's just leave the top as it is who knows what the right thing to do will be and on the bottom what's going to happen well you're going to square this term and you get x + 1 you're going to square two and you're going to get four so you subtract four so this bottom part will be x - 3 right that's just the bottom ah now the factoring trick will work right there's x^2 + 9 I can break up let me rewrite it as x - 3 * x + 3 ah these xus 3s will cancel this is going to get rid of all my problems in the denominator right so I'd just be left with x + 3 * the < TK x + 1 + 2 all right and now with the possible exception of square roots okay there's no possible domain problems okay what about the square root well the square root will have a problem if get negative numbers but I'd be plugging in a three right that's certainly not going to make this negative okay so I can just plug three right in now we have continuous functions so I get 3 + 3 is 6 3 + 1 is 4 is 2 + 2 is 4 6 * 4 24 whatever okay very nice professor before you eras it yeah over here here um with the the jump discontinuity there the limit does exist and it's one but it's not continuous or the LI does that's right so here the limit does exist right because the targets agree yeah okay but it's not continuous because it doesn't actually equal the point it should okay right so if you like it doesn't hit the target right I mean it you know they don't they target something but they don't hit so there's a lot of different things that can happen right one-sided limits could exist and the two-sided limits don't the one-sided limits might not exist right uh the two-sided limits could exist two-sided limit could exist and it not be continuous could be continuous and then later on not be differentiable so there's all sorts of you know conditions get worse and worse here okay uh let's try to do an infinite limit so I'm not being exhaustive of all the possible situations that could occur but this is at least a flavor okay let's look at this limit okay now you go into the math department you ask this question of any of the professors they're going to immediately look at it and say what three three excellent you can be a math professor wonderful right why three expon equal yeah exponents are equal so it's a all so it's okay so we had this formula right from the homework right we said you look at the the highest degree term right everything else doesn't matter you just forget about it cover it up with your hand you say I have X2 X cancel gives 3 what if it was the limit as X goes to minus infinity of - 3x^2 + 2x + 1 over x + 2 let's see so the only thing that matters in this whole thing is the highest degree term okay so up here right there 2x + 1 you can cost that out this x s is much bigger than this this x right so this x isn't going to matter right the only thing that's going to matter is this x s okay as X goes to minus infinity well when you square it the minus doesn't matter so this x s goes to positive Infinity then you multiply it by a three which doesn't matter it still goes to Infinity ah but then you multiply it by a minus so this will turn something going to Infinity into something going to minus infinity okay now if you want to write that out okay you don't want to just leave it to chance that you got the right answer right just by looking at it okay what do you do you start factoring things you factor the highest power term out okay when you do that when you get okay up top you're going to get x^2 * -3 + 2 x + 1x^2 and on the bottom right well I always like the idea of just factoring out the highest powered term in each one so I get X and then 1 + 2 overx now you know what's going to happen right all these things overx those are going to go to zero right here you're just going to get a minus three on the bottom what happens well you're okay first you'll cancel okay so you'll just have an X and on the bottom you okay you have something that's one and then you have something that's going to zero right so this just going to be a one on the bottom so you don't even have to worry about it right so again you're going to be left with right as X goes to minus infinity the only thing left here is the X the minus 3 over one right and of course the over one doesn't matter so as X goes to minus infinity this function goes look at that what happened you went minus time minus and uh oh it should be going to Infinity what's wrong yeah there's something right the square is no longer there so what happened original formula well we of course I mean we we we figure the original formula should work right but boy now we're now we're kind of worried okay which one is correct the first one is correct well let's see no the second the second one is correct maybe because uh minus infinity maybe not included in the Square Theus well let's do this naively as X is going to minus infinity what's happening to the top right well let's say we forget about to 2x + 1 right because we know that in the end this isn't going to matter with a lot okay and we can also forget about the X+ 2 well what's happening well this term right as X goes to minus infinity the X2 goes to Infinity you subtract right and then it's going to go to minus infinity and on the bottom it's going to minus infinity so it should be going to positive Infinity right this is why you have to be very careful right it's easy to look at these cover them up and oh of course that's what's going on okay but as soon as your X goes to minus infinity then you have to be careful okay so that's why I want you to write these things out so in the second that second one where is it that the negative gets where's what like by factoring it how do you where is so so here okay in this one right it was it was easy to see right you have a negative on top you have a negative on the bottom it becomes a positive right here when you divide by X what's happening you're you're dividing I mean okay well actually nothing I mean actually the same thing is happening in both cases okay it never was negative right here you have a negative times a negative which is a positive over a positive so it goes to a positive it's really the same thing you should have up here only I mean here you okay you maybe because you have this x right you but again this is if you think about it as x x x and cancel right that was a negative and a negative that bees a that's a positive also so I'm only pointing this out to say there are two reasons to write these things down one you're less likely to make a mistake two if you had just written minus infinity here because you looked at it just like this one you said okay I know how these work it's three right and you said minus infinity I can't give you credit for writing down the wrong answer and having no work even though you might be able to do a lot of these in your head how do I grade it if you make a mistake and you show me no work okay so that's that's why I show you this okay but right remember with all these sort of problems where you have infinite your X going to Infinity right the trick factor out the highest powers of X cancel right and write these things out and remember whenever you have an X in the denominator as X goes to Infinity those terms go to zero that's the whole point okay any questions about limits let me ask you a question what's the limit as X goes to one from the left of one over x - anybody want to throw to guess colum 1 is that right oh no it's going to be very okay no it's going to be negative infinity negative Infinity okay so now I've heard negative 1 okay which we said okay that's certainly not true right because this denominator gets really small so the fraction gets really big okay negative infinity or positive Infinity those are the two suggestions that I've heard that seem reasonable is it negative or positive it's not negative Infinity columns backing up well what happens if I put in numbers which are what does it mean to come from the left it means a number slightly smaller than one so if I put in a number slightly smaller than one right let's say 0.90 nus one is some small negative number1 negative .1 right when X is smaller than one this denominator is always negative it's a small negative number but it's negative so what's the right answer negative what is the limit as X goes to one from the positive side positive Infinity because now you have numberers slightly bigger than one so you say 1.1 minus 1 that's 0.1 but that's a posi .1 right so you're approaching Infinity like this now think about what this function is this is just if you forgot about Theus one that's just 1X right what does 1x look like 1X looks like this okay from the left side it goes to minus infinity from the right side it goes to positive Infinity okay and what is what does this minus one do to the graph shift it it's a shift which direction not up right because it's inside the function it's not kind of outside and packed onto it right so it's a horizontal shift we it go left or we'll go to the right go to the right it's a negative one right so to to normalize it back to zero right you have to put in a one okay so zero would go to one okay so this whole graph gets shift over but it doesn't change the limits at all okay this would be the same as if I put the limit as X Goes To Zero from the left of just 1X okay which is again or right and from the right going up this way so always constant over infinity orative infinity equal to Infinity if say again constant over infinity a constant over so over okay so if you have a constant over something going to zero that will go to Infinity if you have a constant over something going to Infinity that would go to zero okay and you think about it is you if you have a pi all right nice or piece of you know cake okay if you divide it up into more and more pieces what happens to the size of the pieces they get smaller right and as the number of pieces goes to Infinity the size of each piece goes to zero and as the number of pieces goes to zero well okay now that you have a problem because you can't have an infinite okay it doesn't make any sense that way okay but uh it's still the case right as these denominators go down okay the whole fraction goes up all right and as the denominators go up the whole fraction goes down okay any questions about limits okay let's do some derivatives so let's quickly write out everything we've learned about derivatives and by everything I mean some some small subset I want you to I want you to believe it's not so much so okay first we Define the derivative okay so we had this nice definition right if you had some function which was differentiable right which is just going to mean that the limit I write down exists okay then the derivative is equal to the Limit as H goes to zero FX + hus FX H okay fine this was our definition okay you looked at this limit and you said okay if this limit exists then it's differentiable if it doesn't it's not differentiable we were able to prove that if this limit is going to exist IE if this function is differentiable then what do we already know about the function it's continuous excellent okay so there's our derivative and then we tried to actually apply this limit to functions to find the derivatives of those functions and we decided that this was a lot of work and so we better come up with some rules that will make it so we kind of automate the process without having to look at limits anymore and so what kind of rules did we come up with we came up with right this sum or difference rule right we just said the derivative of a sum was the sum of the derivatives same thing with difference difference meaning subtraction we have linearity which actually includes sum and difference but I'll just use it to say we can pull constants out right so this one says F + G Prime is frime plus G Prime this one says a constant time F Prime is the same as fime time a constant okay we proved the power rule we said if you take X and raise it to any real number the derivative is just that real number time x to that real number minus one then we learned the product rule and this said that if you have two functions and you multiply them and take the derivative that you had well it wasn't just the product of the derivatives you have this nice formula so frime G Plus FG Prime okay we have the quotient rule which said f over G Prime was low D High minus high D low over the low squar and we have the chain rule said if you have a composition of functions and you take the derivative then this is frime of G composed times G Prime right okay so these were our kind of working rules and then we had a whole bunch of functions that we looked at we have trig functions we have the trig functions okay these are the arc signs and Arc cosin and so forth we have the exponential functions right a to the x e to X we have logarithmic functions right Ln log base 2 log base 5 whatever we have the hyperbolic trig functions maybe I'll write those as trig H and then of course we have the inverse hyperbolic tricks but I already promise you I won't put any of those on the exam right okay so that's all we did right we just learned I mean there's a couple tables that go with these right but we saw for instance that trig functions and hypert trig functions the derivatives are almost always the same right just with H's added the only difference is with cosine and secant you have to add a minus we also saw that with trig functions if you only knew the sign the tangent and the secant you could get the rest right just using the law of Co okay every time you put a Co into the function you have to add C's to the derivative and a minus sign okay fine that was easy right we saw the derivative for instance of if you had a constant a a greater than one raised to a variable the derivative was a x Ln of a for log functions right you did the derivative say log base a of X this gave you 1 /x * l of a this is not so hard okay just a few things to remember so now let's try to write down a problem that's going to use everything excuse me yeah this one we going to shift it to White yeah and what about the second one this one yeah everything it's I mean this is shifted to the everything is shifted to the right to one yeah everything has to get shifted to the right so this has to so so if that's one everything's going to get shifted over to two so it's now going to like that and then this thing has to get shifted over from zero to one so like that everything's well it's it should shift very nicely this is not graph very well everything has to shift over by one we graph okay so let's try to compute the following derivative how about s of X over x^2 + 2times uh I's say let's put a three here um how about uh log base I like two log base 2 of x - 3 squared okay let's see what else do we okay we have sums we have differences we have linearity we have a power rule we have a chain rule we have a product rule we have a quotient good okay we have trig we need need an inverse trie okay so I use that say AR tan of let's see what are we missing we have a log we need an exponential okay so let's do an exponential of how about hyp secant of X okay so let's see so there's a sum rule in here right there's a difference there's a sum okay so we got that there's a linearity cuz there's a three in the front okay there's a power rule right we're going to have to use that here there's a product rule cuz these two things are multiplied there's a quotient rule right we have a quotient there's a chain rule because you have a function of a function let's see you have a trig because you have a sign you have an AR tangent you have an inverse trig we have an e so there's an exponential we have a log base 2 so there's a log we have a hyper secant so there's your hyper trig function and we don't care about that because we're not going to do it okay so this example has everything okay let's make some room in fact I'll move this up okay all right let's do it let's try to work this left or right I mean first thing you do of course is you you look at it you say okay is there anything simple I can do you see anything simple you can do tell uh you can break up I guess the first two terms ASX G of absolutely right okay so here you have a function right you might call this F and you might call this G that tells you you're going to have to use what rule product right now before we go on look at this function a little closer right I have a log of something to an exponent right and logs turn exponents into multiplication so it's going to take this two and it's going to move it out to the front and where does it go from there well I can move it all the way out to the fr front and this automatically becomes a six okay so that's the first thing so that that'll you can see that's actually going to simplify things a little bit yeah okay so that's nice okay so we're going to have to use the product rule here so we know what it's going to be it's going to be 6 fime G right plus FG Prime minus okay now over here what if we let's see how about we call this function U then what's going to happen it's going to be the derivative of ran of U and what's the derivative of Aran good thing to know one over T of x 1 1 + x^2 okay good thing to know okay so this is going to be 1 over 1 + u^ 2 times the derivative of U right so I have to use the chain rule on this thing Okay so we've written this out this is very you know this is kind of nice and neat right we write out this long long expression that we get lost on right we just wrote it down in nice symbols now let's just decide what all these derivatives are okay okay so f is s Sor I should really say f ofx is s of X over x^2 + 2 okay so what is the derivative going to be okay well what rule am I using right off the bat rule chain rule right derivative of the sign is coine okay and then I just have to put this right back in every time I use a chain I do the same thing derivative of the outside evaluated at the inside times the derivative of the inside okay now what do I have to do to find the derivative of this quion Ru okay fine so low D High derivative of x is one okay no problem minus okay High derivative of low what's the derivative of X2 + 2 2x okay so I just get a 2x^2 here over the bottom squar okay that's not so bad okay so we figured out what FR Prime is okay now we need G Prime okay well G is log base 2 of x - 3 so what's G Prime 1 over x - 3 a natural log of two right if this was Ln I'd be done but with log base 2 I have to throw in an Ln of two times one one all right because I multiply by the derivative of xus 3 but of course that's one so I don't have to write okay cool we have the frime we have the G Prime right now we just need the U Prime so U is e to the hyp secant of X what is U Prime equal to right just the same thing times the derivative of hyp secant what's the derivative hyp what the what's the derivative of cant C tan right now with the hypers it's always the same thing right except with coine and secant where you have to add a negative okay that's the only those are the only exceptions with cosine and secant when you go to the hyperbolic you have to add a negative so this is times okay well if it was just you didn't have to add the negatives this is what it would look like right cant tan with the H's but because it's secant you have to put a negative out front so cosine and secant when you go to the hypers those are the only exceptions those you have to pick up the negatives all the rest of them they're the exact same derivatives with H's added on to the end so you said Kos have when when you do the derivative of Kos right if it was just derivative of cosine it would be minus s but derivative of Co is s okay so you have to add the extra negative so it becomes negative negative sign or or just sign with the H cinch and tangent right what's the derivative of tangent right so what's the derivative of T set squared right it's just the same thing but you add the H okay all right and the only thing you have to remember is if it's coine secant and remember secant is just one over cosine so it's all about cosine right if you have a cosine in there or aant you have to put in a minus sign that's the only exception okay now one could put this all back into this formula one should or one should not I say on this exam one should not okay here we have written down everything okay we have a formula and then I tell you right what each unknown piece in the formula is okay I tell you what f is I tell you f Prime g g Prime U and U Prime okay anybody who wanted to plug it in could okay but you've done all the work you've shown everything this is perfect move on to the next problem Absolut what's the point you know in computer science you know they break everything up into these little modules right this objectoriented programming right you do little pieces of the problem at different places and in math that's just as good an idea okay if somebody really wanted to write out this long expression they could but what's the point right you've done the work it's there there's no sense in in just killing yourself H already you'll make a mistake copying it it's not your fault it's human nature what about AR this is arctan yeah okay so where was that that was in here right the derivative of R tan became this 1 1 + U ^2 times the derivative of right we had to use the chain and is it so this problem has everything we've done in it right as far as derivatives Go I mean okay there there's the other trig functions all right that you have to memorize okay but us those I you just have to know what those formulas are right using them it's the same as just any other function okay so if you can do this one you should be able to do just about any derivative I can put on the test right okay I've gone over time so let me stop here uh it does end at 10:47 is that or 10:45 oh 50 okay I have three minutes to remind you about implicit differentiation good good good okay so let's say you have some equation of the form uh let's say e 2 y * X+ sin inverse of X 2us Y okay and we'll say it equals zero so it's some implicitly defined function right implicitly meaning I'm not giving you the function you know y equals a function of X okay and I want to know what is dydx so dydx is okay now I have to warn you if you ever show this formula to any math professor who knows what they're doing they're going to laugh at you because it's not actually precisely correct okay the ideas are in there but I don't want to go into the whole definition of partial derivatives so don't worry about it but there is a problem with it namely I'm dividing two verbs here you can't divide verbs you can only divide nouns okay so remember the way we did this so we put down a minus then we go through and we differentiate this top expression here right with respect to X meaning we treat y as a constant okay it's just like a six right so e to 2 y * X well e to 2 Y is a constant so it's just it's like a six 6X what's the Dera of 6X 6 what's the Der e 2 y * x e 2 y okay plus okay we have AR sign of x^2 minus a constant okay so we need to know what is the derivative of AR sign - okay 1 - x s but here the x is actually this inside bit right so I have to put x^2 - y^ 2 times what I can multiply by the derivative of x^2 - y Y which is do keys do keys by 2x right the Y is just a constant okay fine divided by now I do the whole derivative again but I treat X as a constant okay so now X here is a constant so what's the derivative of e 2 y * a constant x e 2 y e to 2 y right cu the derivative I the X just stays there the Der e 2 Y is e 2 y times the Dera of 2 Y which is two right if use the chain okay plus now we have to do the same thing we have R of x^2 - y the derivative of AR sign is still 1 over theun of 1us the input squar now we have to do times the derivative of x^2 - Y where X is a constant is it one okay imagine if this x squ was well if it's a constant it could be any constant so let's Let It Be zero so you have minus one what's the Der of minus Yus one okay now you could fiddle with this a little bit make it look a little nicer but don't worry about okay so it's very easy just write down your answer right and just remember to write down the pseudo formula pseudo because it's not exactly the correct gives you the right answer but it's formally incorrect okay so I have office hours today one o00 uh so come on in and see me if you still have questions good luck tomorrow how you say in expans what thanks for good luck I just learned how to say tangle