Skip to main content

Course Notes for Calculus I

Section 2.4 Operations on Functions

Subsection 2.4.1 Pointwise Operations

The most familiar way to put functions together is through the conventional operations of arithmetic: addition, subtraction, multiplication, division and exponentiation. If \(f\) and \(g\) are functions, then \(f+g\text{,}\) \(f-g\text{,}\) \(f \cdot g\text{,}\) \(\frac{f}{g}\) and \(f^g\) are all functions. They may have additional domain restrictions, such as avoiding the roots of \(g\) in \(\frac{f}{g}\text{.}\) These combinations are called pointwise operations on functions; the name comes from the fact that, in each operations, I can evaluate the two functions at any given point and then do the required arithmetic afterwards.

Subsection 2.4.2 Composition

A more novel way to combine function is composition. In pointwise operations, both the functions act seperately on the input and then I combine the result. In composition, I let one function act first and then let the second act on the output of the first. If \(f\) and \(g\) are functions, I write \(f \circ g\) or \(f(g(x))\) for their composition. In this notation, somewhat counterintuitively, the function on the right acts first. \(f \circ g\) means: let the function \(g\) act first and then let the function \(f\) act second. Additional domain restrictions may result from composition, since the output of \(g\) must be acceptable input for the function \(f\text{.}\) In \(f \circ g\text{,}\) I call \(g\) the inside function and \(f\) the outside function.

Example 2.4.1.

If \(f(x) = e^x\) and \(g(x) = x^2+1\text{,}\) then \(f \circ g (x) = e^{x^2+1}\) and \(g \circ f = (e^x)^2 +1\text{.}\)

Example 2.4.2.

Often is it important to recognize a composed function and identify the pieces of the composition. The function \(h(x) = \sqrt{x+7}\) is a composition with inside function \(g(x) = x+7\) and outside function \(f(x) = \sqrt{x}\text{.}\) For complicated functions, there may be several ways to decompose the function as a composition; finding various decompositions and knowing which composition to use is an important skill.
Composition can be iterated. If \(f\text{,}\) \(g\) and \(h\) are functions, \(f \circ g \circ h(x)\) is the composition of all three, with \(h\) acting first, \(g\) second and \(f\) third.

Subsection 2.4.3 Inversion

The last important operation on functions is inversion. Inversion attempts to undo what a function has accomplished, to go backwards and return the output to the original input. If \(f(x)\) is a function, I write \(f^{-1}(x)\) for its inverse. This notation does not mean the reciprocal function \(\frac{1}{f(x)}\text{.}\)
In order for a function to be invertible, each output needs to go back to a unique input. This restriction implies that no two inputs can be sent to the same output. This property is called injectivity, but for our purposes, it is enough that a function is monotonic. A function which always increases or decreases can only have one input sent to any particular output; therefore, it is invertible. When I want to invert a function, I must first make sure that it is monotonic.
Here are some example pairs of functions and their inverses: notice that each inverse function undoes whatever the original function was doing.
\begin{align*} f(x) \amp = 3x \amp \implies f^{-1}(x) \amp = \amp \frac{x}{3} \\ f(x) \amp = \sqrt{x} \amp \implies f^{-1}(x) \amp = \amp x^2\\ f(x) \amp = \frac{1}{x} \amp \implies f^{-1}(x) \amp = \amp \frac{1}{x} \end{align*}
When I compose a function and its inverse, I get the original input back. That is \(f \circ f^{-1}(x) = x\) and \(f^{-1} \circ f(x) = x\) on the approriate domains. This is very useful for manipulating equations, since I can remove any function by composing with its inverse. The following examples go through some common ways of using inverses to solve for variables by undoing functions.

Example 2.4.3.

I use the natural logarithm to remove the exponential with base \(e\text{.}\)
\begin{align*} e^x \amp = y\\ \ln e^x \amp = \ln y\\ x \amp = \ln y \end{align*}

Example 2.4.4.

Likewise, I use inverse trig to remove a trig function.
\begin{align*} \sin x \amp = y\\ \arcsin (\sin x) \amp = \arcsin y\\ x \amp = \arcsin y \end{align*}
For a monotonic functions, the domain of the inverse will be the range of the original function. If I can calculate the range of the original function, I get the domain of the inverse for free. In the first example above, the range of \(e^x\) is \((0,\infty)\text{,}\) so that becomes the domain of \(\ln x\text{.}\) In the second second above, \(\sin x\) is not monotonic on its whole domain, so I have to make an adjustment before I can understand the range.

Subsection 2.4.4 Restriction of Domain

Figure 2.4.5. Restricting the Domain of \(f(x) = x^2\)
Many functions are not monotonic, but I would like to invert them anyway. I solve this problem by restricting the domain. A classic example is the quadratic \(f(x) = x^2\text{.}\) This function has a domain of \(\RR\text{,}\) but it is not invertible, since both \(x\) and \(-x\) are sent to \(x^2\text{.}\) Going backwards, I do not know whether to sent \(x^2\) to \(x\) or \(-x\text{.}\) Therefore, I restrict the domain. The function \(f(x) = x^2\) on the restricted domain \([0, \infty)\) is increasing, therefore it is invertible. Its inverse is \(f^{-1}(x) = \sqrt{x}\text{,}\) returning the positive square root. If I had instead restricted to the domain \((-\infty, 0]\text{,}\) the inverse would have been the negative square root: \(f^{-1}(x) = -\sqrt{x}\text{.}\)
The example of \(\sin x\) I used above is desperately not monotonic: it oscillates up and down constantly. I have to make a severe restriction to invert it, by choosing a very small piece where it is monotonic. For \(\sin x\text{,}\) the conventional choice is the interval \(\left[ \frac{-\pi}{2}, \frac{\pi}{2} \right]\text{,}\) where \(\sin x\) is an increasing function. On this interval, the range of \(\sin x\) is \([-1,1]\text{,}\) so the domain of \(\arcsin x\) is also \([-1,1]\text{.}\)