Hi stackexchange community!,

So lately I been learning a bit about limits and I stubbles acrossed the idea of a composite limit. Something like $ \lim_{x\to 2} f(g(x)) $

$ \lim_{x\to 2} f(g(x)) $ = $ f(\lim_{x\to 2} g(x)) $

What confused me was how you could still have a limit for you composite function even if f the outer function was not countinuous at that point. I tried to find online videos to explain this topic to me however no one gave intuitive or a rigirous proof. They just showed you how to find out it still exist and then called it a day, never explaining why it worked.

For example this simple khan academy video has an example on how the limit of f(g(x)) could still exist even if f is not countinuous at that point: https://www.khanacademy.org/math/ap-calculus-ab/ab-limits-new/ab-1-5a/v/limits-of-composite-functions-external-limit-doesn-t-exist?modal=1

Could anyone help me out on this. Give me some reasoning behind how the limit could exist without f being countinuous.

Thank you all again, Cheers!๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰

  • 1
    $\begingroup$ You can only pass limits inside functions if the function is continuous at that point. Here, the inner function was continuous at the required point, but the outer function isn't. Hence the limit doesn't exist. I wouldn't think too hard about this. Just work inside out and see if things work. Proof is not at the level of AP Calculus. $\endgroup$ Dec 8, 2021 at 2:18

1 Answer 1


In practice, most functions in applications are continuous, and we often use the fact that you can switch the order of a limit and a continuous function.

However, hereโ€™s two ways where $f$ might not be continuous, even though $f(g(x))$ is continuous at a point.

  1. $g$ is a maximum or minimum. As an example, let $f(x)$ be $-1$ for $x<0$ and $1$ for $x\geq 0$,

\begin{cases} -1 & x<0 \\ 1 & 0\leq x. \end{cases}

Then $f(x^2)$ is $1$ as $x$ approaches $0$, since the inside is always nonnegative.

  1. Both $f$ and $g$ are discontinuous. For example, let $f(x)=g(x)=1/x$ except at $0$, where $f(0)=g(0)=0$:

\begin{cases} 0 & x=0 \\ 1/x & x\not=0. \end{cases}

Then $f(g(x))=x$ is continuous at $0$ even though neither of them are, since the discontinuities effectively cancel each other out.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .