🔙 to jackgiffin.com

You have a function $f(x)$ and a function $g(x)$ such as is shown below.

$f(x)$

$g(x)$

We readily know that $x\to 0f(x)=-4$, but how do we find $x\to 0g(f(x))$? With direct substitution, we get $x\to 0g(f(x))=x\to -4g(x)=DNE$ (DNE means *Does Not Exist*) because $x\to -4g(x)=-1$ and $x\to -4g(x)=1$, so $x\to -4g(x)\ne x\to -4g(x)$. Let us analyse what happens in function composition.

Let us analyze the composition of $g(f(x))$. Comprehend that $y=f(x)$ such that the domain—all x-values that the function passes through—is the input and the range—all y-values that the function passes through—is the output of the function. Now, imagine $g(f(x))=g(y)$. From this perspective, the range outputted by $f(x)$ becomes the new domain of $g(f(x))$. Observe the visual below. (Note that the grid is rotated 90 degrees to aid comprehension, so the x/y axes are flipped such that y is horizontal and x is vertical).

$y=f(x);\; g(f(x))=g(y)$

As the above image reveals, the range of $f(x)$ is never less than $-4$, so the numbers going into $g(y)$ are never less than $-4$. Thus, we can ignore all values of $g(y)$ that are less than $-4$, leaving $g(x)$ with only a single $y=1$ horizontal line which is the only remaining possible answer to $x\to 0g(f(x))$, so $x\to 0g(f(x))=1$ wins by default. Below is a graph of $g(f(x))$. Notice how its range consists of a single number: 1. In other words, $g(f(x))=1$ is true for each and every real value of x except for $0$ which is undefined.

$g(f(x))$

Now, how to do $x\to 0g(f(x))$ mathematically? Here's how:

- Let $x\to cK(L(x))$ represent the situation where $K(x)$ and $L(x)$ are both arbitrary functions that both pass the vertical line test.
- Partial substitution with $K(x\to cL(x))$ must have failed, else you would use this partial-substitution value as the result.
- There must be a local minima or a local maxima at $L(c)$ such that either it's a local maxima due to $L(c)-1/\infty \le \; L(c)\; \le \; L(c)+1/\infty $ or it's a local minima due to $L(c)-1/\infty \ge \; L(c)\; \le \; L(c)+1/\infty $. In other words, the function must have either both higher or both lower values on either side of $c$. If there is no local minima/maxima, then $x\to cK(L(x))=DNE$. Recall that infinitely small values can be used to prove one-sided limits such as $x\to 21+x/x-2=x\to 21+x/x\to 2x-2=2+1/x\to 2(x-1/\infty )-2=3/2-1/\infty -2=3/-1/\infty =-3\infty =-\infty $. These infinitely small values are also used with local minimas and local maximas in the same way. By an alternative definition, take the derivatives—rate of change at every single point—of $L(x)$ and there exists either a local minima or a local maxima at $c$ if $L\text{'}(c)=0$.
- If there is a local minima—increasing values on either side—at $c$, then $x\to cK(L(x))=y\to L(c)K(y)$. Else, if there is a local maxima—decreasing values on either side—at $c$, then $x\to cK(L(x))=y\to L(c)K(y)$.