 Welcome back everyone. In this video, I want to show you that not all differentiable functions are equal to their Maclaurin series. In previous videos, I put a lot of emphasis on if a function is equal to its power series, if a function is equal to its Maclaurin series, if it's equal to its Taylor series. And then in the last few previous videos, we actually showed specifically how can you show whether a function is equal to its Maclaurin series or not using Taylor's inequality. Why is this such a big deal? Well, because sometimes there are functions which are not equal to the Maclaurin series. So case in point, consider the function f of x, which is given by the following rule, e to the negative one over x squared when x is not zero, and it's equal to zero when x equals zero. So let's explore this function for a moment. Since we define f of x to equal e to the negative one over x squared for every number except for x equals zero, it's going to be continuous everywhere except potentially at zero, right? This is a piecewise function. Is there a discontinuity at zero? Let's let's investigate this and we'll actually see that this function is continuous. So what we want to do is we want to take the limit. We want to take the limit as x approaches zero. Consider this function e to the negative one over x squared. Now notice that if you take, if you plug in x equals zero right there, e to the negative one over zero squared, clearly that thing is undefined, right? That thing doesn't is undefined. So although the function can't be evaluated at zero, that e to the negative one over x squared, what we do get is that we can take the limit as x goes to zero in that situation. Now in that situation, because the exponential is a continuous function, we can actually take it out of this limit process, the base e right there. And so we end up with something like e raised to the limit as x approaches zero of negative one over x squared. So what is happening in this situation? So in this situation as x approaches zero, we're going to have x, we're going to get one over zero basically, right? Which one over zero is going to be something infinite, it's going to be positive or negative infinity. But it turns out it doesn't matter which approach you take because you're squaring things, you're going to end up with a positive infinity. And so what we see here is that this thing is going to, so as x approaches infinity, one over x squared is going to be, so as x approaches infinity, I'll be explicit here. We see that one over x squared is going to approach, oh I said it wrong, I'm sorry, as x approaches zero, one over x squared will approach infinity. That's what I was trying to say. And therefore this limit is the same thing as the limit as t approaches infinity of e to the negative t, something like that. And so we know what happens to the exponential as you get closer and closer to infinity, e to the negative infinity will get closer and closer to zero, the horizontal asymptote of e to the x. So in fact this tells us that e to the negative one over x squared, it approaches zero as x gets closer to zero. And so basically what happened is this function has a removable discontinuity in it and we're just adding back in that removable, that remove point. And therefore this function is continuous at all values over its entire domain, negative infinity to infinity. That's the first thing to mention. So we want to show that this function is differentiable, but we start off with showing that it is continuous. So now let's consider the derivative right, we're going to show, so if we look at the limit, so take the limit as x approaches infinity, sorry as x approaches zero of the expression f of x minus f of zero over x minus zero. Notice we're taking the limit of a difference quotient. And so we're going to show that this function is differentiable. Well clearly we can take the derivative of e to the negative one over x squared, but the problem is since x equals zero is defined differently, we have to compute the derivative a little bit differently in this situation. So let's compute the derivative of the function at zero. So if we take a look at this limit, the limit as x approaches zero of f of x, which just make a sort of an aside here, what we're trying to do is we're trying to compute f prime of zero. What is the derivative at zero, we can do the derivative anywhere else, what happens at zero, we get f of x minus f of zero over x minus zero. So some things to note here is that f of zero is itself zero, right, and f of x will look like e to the negative one over x squared for any number that's close to zero. So when you take the limit, remember this is calculus one stuff right here, when you take the limit, we don't actually plug in x equals zero, continuity allows us to do that, but we have to investigate what happens to the function as we get close and close and close to zero, closer to zero. Now the function if you're not equal to zero will look like e to the negative one over x squared. So that's what f of x we can plug in for now f of zero itself is zero. And on the bottom we get x minus zero. So this would simplify to be the form can access approaching zero here, we get the limit as e of e to the negative one over x squared over x, as x approaches zero right here. And so we want to compute this thing right here, we want to compute this will notice you have a negative exponent on top, this negative one to the negative one over x squared you can bring e to the bottom. And, well, we also just to make to make life a little bit easier to us I'm also going to bring the x to the top, right. This will make much more sense in just a second but if we move things around you're going to get the limit as x approaches zero of one over x divided by e to the positive one over x squared like so. Now notice what happens as x goes to zero in that situation on the top as x goes to zero one over x, you know if you're approaching from the right, as x approaches zero from the right one over x will get closer and closer to infinity. In the denominator as x approaches zero one over x squared will get closer and closer and closer to infinity as well. We get zero or e to the infinity this thing will look like infinity over infinity. This is indeterminate form and therefore we're going to use L'Hopital's rule next. L'Hopital's rule take the limit of top and bottom. The top isn't so bad just one over x you're going to end up with negative one over x squared. Now if you take the derivative e to the one over x squared there's no problem with the derivative of that function just the issue at zero is what's going on here. So if you take the derivative by the chain rule you're going to get back to exponential one over x squared. You're going to then times out by the inner derivative which is going to be negative two over x cubed. Now there's some simplification that's going to happen between this negative one over x squared and this friend right here. Basically I want to times the whole fraction by x cubed over x cubed because I know these negatives will cancel out it's a double negative. So if I times top and bottom by x cubed you end up with the limit as x approaches zero. On the top you will end up with just an x in the denominator you're going to get two times e to the one over x squared like so. Alright and so in this situation what then is happening as x approaches zero the top is going to look like zero. The bottom is going to look like infinity like it did before. Dividing by zero or dividing by infinity is actually the same thing as times by zero these two are actually congruent with each other this limit is equal to zero. And so this actually tells us that the first derivative of this function evaluated zero is going to equal zero. So what we've now shown is we now have a function which is differentiable it's differentiable everywhere. The only concern was at zero of course we've now shown that the functions continuous at zero and it's differentiable at zero. Let's actually take a look at what this function looks like what does y equals f of x look like if we take a graph here. So I took the liberty of graphing this prior to the start of this is with the computer. So this is our function this is e to the negative one over x squared which again that function typically has a removable discontinuity at the origin we filled it back in by defining it to be zero right there. And so when you look at this function you look at the origin it looks really really really flat at the origin. And that's somewhat of an optical illusion because if we were to zoom in we would see that never ever ever is it horizontal. But to the naked eye it looks like it's flat it looks like it's a constant function near the origin. Again that's that's that's not true but that's actually one of the reasons why we're looking at this function. Because if you were to look at the tangent line of this function at the origin the tangent line is going to give you a horizontal a horizontal line. And so when you get far away from the origin this is grossly inaccurate right this thing will asymptotically converge towards one as X goes to positive or negative infinity. But if you start involving other Taylor polynomials like if you look at the if you look at a Taylor parabola right you're still going to get a flat line. If you look at a Taylor cubic polynomial you're also going to get a flat line. The thing is we're going to see in just a second that the flatness near the origin is actually saying that all of the higher derivatives are going to be zero as well. And so let's take a look at that. So the next bit let me actually prove a very useful identity here. So if we take the derivative of e to the negative one over X squared divided by X to the end that gives us the following formula we can see this very quickly just from our usual derivative rules. Right so if we apply the quotient rule in this situation we get low X to the end d high the derivative of the top which like we saw before this is going to look like e to the negative one over X squared times the inner derivative which will be in this case a positive two over X cubed. And then we subtract so we did low d high minus high d low take the derivative of the bottom that's going to be in times X to the end minus one. Square the bottom here we go and the bottom you're going to get X to the two end like so. And so then try to simplify this thing if there's anything we can do. Really some things to note here is you have an X cubed right here we have a X to the end right here those will combine together those combined together to give you X to the end minus three. Let me let me write that together here if you factor out the I guess I don't necessarily need to factor out because they have these things right here the e we can factor that but we'll just leave it the way it is. So if you do the first part you're going to have X to the end minus three. There's also this factor of two that's right there to this will sit above X to the two end times that by e to the negative one over X squared. And then you're subtracting from this because we're subtracting right here we're going to have minus in X to the end minus one over X to the two end and then that power of e shows up one more time. And then simplify these powers of of X right there right you have two and on top you have in minus one on the bottom the ends cancels then you get an end. You're going to get when you put this together right and negative three goes actually the bottom so you can end up with an X to the in minus three in plus three on the top bottom excuse me. So you get two over X plus three e to the negative one over X squared. And then for the other term you get something similar right the ends you're going to get in that cancels here so you just get a in on bottom you have a negative one on top the negative one comes down so you get in plus one. And so then we end up with negative and over X to the in plus one e to the negative one over X squared. And so that verifies the identity we're trying to show that when you start taking derivatives of this e to negative one over X squared over X the end you get something looks like this. So why is that relevant well now I want you to take a look at the following right. Let's compute we're now ready to compute the Maclaurin series for this function f and we're going to consider its radius of convergence. Now, with the with the Maclaurin series right Taylor's inequality or tell us Taylor's equation excuse me tells us that CN is going to equal f, the derivative of f evaluated at this case zero since it's Maclaurin series divided by in factorial. In order to do Taylor's inequality we're going to need to know the derivative of our function here, and one can show that the derivative of our function, it'll look something like the following you're going to get. E to the negative one over X squared times a sum K equals zero to three to the end of some coefficient sequence, we'll call it a sub K right here, divided by X to the K. So what basically what we get from what we get from what we saw before right so come back to coming back to what we saw before right when you start taking the derivative of e to the negative one over X squared. Did we ever do that somewhere we did remember we were doing it over here with loby tolls where we had to take the derivative what we actually did negative one over X squared, but we take the derivative of this thing. Other than some signs right the derivative is going to look like the original exponential, you can get the original exponential, and then you're going to get a multiple with power of X and the denominator, but what happens when you take the next derivative right. So like if you took, if you took this thing, you take this e to the negative one over X squared. Now you have like this positive two over X cubed, when you take the derivative again you have to do the quotient rule, and by the quotient rule, you're going to get something that looks like this. Right, we had this coefficient of three right there, and then there was this two in front no big deal. That's going to affect things so you get like, you're going to get like a four right here you're going to get a six right there. Then you're going to get a three right there and a four right there. The point is, you're going to get something that looks like this, these things right here. You have an e to the negative X squared divided by some power of X. You're going to get e to the negative one over X squared divided by some power of X. That's what we have right here and when you take the derivative you're going to get two more things that look like this. There's this similarity between the function and its derivative. No matter which derivative you take, the higher derivatives of e to the negative one over X squared will look like e to the negative one over X squared times some linear combination of reciprocal powers of X. So if you take derivatives you're just going to get this form over and over and over and over again. And so mimicking the strategy we did before because technically this guy is not defined at X equals zero but if you take the limit as X approaches zero you will see that this expression will go to zero over and over and over again. So using this idea of limits and derivatives that we're introducing right here, we're going to see that f the derivative of our function evaluated at zero is equal to zero. That's the key observation right here. Therefore, when you look at Cn, you're going to get zero over n factorial. That's always equal to zero. And so then when you look at the Maclaurin series T of X, this will look like the sum where n goes from zero to infinity of zero over n factorial times X to the n. This will equal zero plus zero X plus zero X squared plus zero X cubed, etc, etc. This is just the constant function zero, right? And as this functions, this Maclaurin series is just zero. I don't even need to do the ratio test to find out the radius of convergence here. The radius of convergence here will be infinity because this is just a constant function zero. Now let's go back to our function graph, right? Does this function look like the zero function? Nah, there is curvature going on here. And so what we can see from this example, it took a bit to explain it. But we see that this function is an example of a differentiable function that does not equal its Maclaurin series on the interval of convergence. The interval of convergence, remember, was negative infinity to infinity, but the only place where the function agrees with its center, or the only place where the function agrees with its Maclaurin series is at the center, right here. When X equals zero, Y equals zero, and the two functions agree with each other. And when it comes to a power series, the power series must be converging at its center. Ours, of course, is converging for everywhere. But more importantly, a power series representation will always agree with the function at the center, but you have no guarantees that they'll be equal anywhere else. So even on that interval of convergence, this is huge. This function is nowhere equal to its power series representation. So do watch out about that, that this idea of if a function is equal to its Maclaurin series improving that it is, is actually a very legitimate question. Now, we did that for some very basic functions like e to the X and sine of X, and you can mimic those strategies to show it for other important functions like cosine and cinch and cost or something like that. So we're going to kind of take it for granted going forward that functions are equal to their Maclaurin series, but hopefully this example teaches you that that is an assumption we're making just to make life easier for right now. It is a question that someone would have to return and resolve eventually. It's like in a physics class like saying, let's play with a model which is frictionless. Where are you going to find a frictionless environment? Never, never, never. But we as an educational tool often make these assumptions so that we can focus on other aspects without worrying about other things that complicate the process. A function equal to its Maclaurin series is such a problem, which although we are going to kind of ignore it going forward, this example teaches us that it's a big problem and one should actually care about it at some point or another.