 In this video we want to talk about how function composition interacts with continuous functions and the good answer is they actually are quite compatible with each other. So imagine a function f is continuous at some number b, and that number b happens to be the limit of the function g of x as x approaches a. That's the limit of that thing. Then if b is the limit of g and f is continuous at that number b, then when we compose them together, right, you have, so this right here is f of g of x. Like so, right? If you take the limit as x approaches a of f of g of x, because f is continuous, then the limit is just going to be f of b. I'm not assuming g is a continuous function. I'm just saying if you take, if the outer function in terms of function composition is continuous, then you basically can pull it out of the limit process. So the way that one usually considers this property is actually this statement right here. The limit as x approaches a of f of g of x is equal to f of the limit of g. So you can factor a continuous function out of the limit process if it's that outer function. Let me show you how one can use that principle right here. Take the function, or take the limit as x approaches one of sine inverse of one minus the square root of x over one minus x. Now you might be tempted just to throw in one here, in which case you're going to end up with sine inverse of zero over zero. That's undefined, so what do you do with that? Well, the good news is that the sine inverse is not what causes any obstruction here. Sine inverse is a continuous function, so we can actually bring sine inverse out of the limit process, in which case then we get sine inverse of the limit as x approaches one of one minus the square root of x over one minus x. Like so. But then we still have the problem that if we try to plug in x equals one, you're going to get zero over zero. So what I want to do is I want to rationalize the numerator. You have that one minus square root of x there. We're going to times the numerator by one plus the square root of x. We have to do the same thing to the denominator so that the proportion is preserved. So multiply these things out. We're going to end up with sine inverse of the limit as x approaches one. And the numerator, when you foil that out, you're going to get one minus x. I'll let you verify that. In the denominator, we're going to leave it factored because after all we have a one minus x and we have a one plus the square root of x for which the one minus x is going to cancel out. And so my simplified limit will look like sine inverse of the limit of one over one plus the square root of x as x approaches one. You now will see that we've removed the discontinuity that if you used to plug in x equals one, you don't get division by zero anymore. So you're going to get sine inverse of one over one plus one. That is sine inverse of one half. And as sine inverse is the inverse of sine, we're looking for that angle theta such that sine is equal to one half in the first or fourth quadrant for which in the first quadrant, sine is equal to one half at the angle pi sixth or 30 degrees like so. So we are the pull out sine inverse because it's a continuous function. So let's continue with that idea. If both G and F are continuous functions, more precisely if G is continuous at a and F is continuous at G of a, then the composition of two continuous functions will be continuous. The only way behind it is actually fairly straightforward. Since G is continuous at x equals a, that means the limit of G of x as x approaches a is G of a. That's what continuity is all about. So then if you take the limit of F of G of x as x approaches a, well F of G of x just means you put G of x inside of F. Because F is a continuous function by the previous result, you can factor it out. So we see the limit of G but as G is continuous, the limit of G as x approaches a will just be G of a and then F of G of a is just F composed with G evaluated a. So we see that the composition of two functions that are continuous will give you continuous a function there because again the function evaluation equals the limit. For example of that we might ask ourselves where the following functions continuous take the function F of x equals sine of x squared. You will notice in this scenario that sine of x squared, this function could be decomposed. This looks like sine of you compose with x squared. That is, if you put x squared inside of sine, that's where this function comes from where you'll notice that x squared is a continuous function because it's a polynomial. Sine of you is a continuous function on all real numbers. Therefore, the answer to the question is that this function will be continuous on all real numbers. It's continuous on its domain because the function is continuous on its domain. This question about where is it continuous basically boils down to what is the domain of this function. You'll often see that because the vast majority of functions we study in calculus one are continuous functions. You can see the graph of the function right here. You'll notice that there are no breaks, rips, holes, no removable points, no jumps, no vertical asymptotes. This is a continuous function everywhere. Let's look at another example. This one actually is going to have some discontinuities this time. Take F of x to equal the natural log of one plus cosine of x there. Let's investigate our functions here. This can be decomposed as F of g of x where F of x is the natural log function and then g of x is the one plus cosine function like so. Notice that capital F of x is obtained by putting g of x inside of the natural log here. Now, when it comes to g, g is going to be continuous on all real numbers, negative infinity to infinity. How do we get that? Well, we know that cosine of x is a trigonometric function is it's continuous on its domain, which is all real numbers. Adding one to it, you shift the graph up, that doesn't change continuity. So g of x is continuous for all real numbers. What about the natural log? Well, there is something to that one. The natural log's domain is not all real numbers. It is continuous on its domain, but the natural log's domain is going to be continuous on the interval zero to infinity like so. And so there is a little bit of a concern as we put the g of x inside of F of x right here. Is it ever possible that g of x could fall outside that domain? So let's consider that for a moment here. Could g of x one plus cosine of x, could that ever be less than zero? Could it actually be equal to zero? That's also a problem. Well, you'll notice that if I were to subtract one from both sides, you're going to get that cosine of x is going to be less than or equal to negative one. But cosine in general, remember, cosine of x always sits below one, but it sits above negative one. Now it could actually equal negative one. So strictly less than negative one is not possible, but equality is, right? When is cosine equal to negative one? Well, that's going to happen at odd multiples of pi. That is, we're going to get that x is equal to 2k plus one times pi, where k is some integer. So for example, cosine of pi is negative one, cosine of three pi is negative one, cosine of negative pi is negative one. That's what we're talking about right here. And so whenever x is an odd multiple of pi, cosine will be zero, in which case then you're going to take the natural log of zero for which that's undefined. And that's going to give us a discontinuity. The natural log has a vertical asymptote when you approach zero from above. And so since cosine can't approach negative one from below, it can only approach negative one from above, this will have a consequence that our function capital F of x will approach vertical asymptotes when you hit odd multiples of pi. So this thing right here, this is at pi, right? 3.14. It's a little bit bigger than three. So this right here is a vertical asymptote at negative pi, which again, we're to a little bit left of negative three on the x axis there. So determining where this function is continuous came down to recognizing that the natural log has had a vertical asymptote at zero. And when does the inner function then hit that zero marker?