Functions
Limits and Derivatives
Applications of Differentiation
Integration

Basic Function Arithmetic Using Function Rules, and Numerical Substitutions

Doing Arithmetic on Functions

Functions can be added, multiplied, subtracted, and divided. In fact, nearly every algebraic operation you can think of can be applied to functions. The way these operations are performed is exactly like what you’d expect and works exactly like how you’d add, subtract, multiply, etc. any pair of algebraic expressions.

$$\begin{align}f(x)+g(x)&=(x^2+1)+(x^3-3x^2-1)\\&=x^2+1+x^3-3x^2-1\\&=x^3-2x^2\end{align}$$

Just added like-terms! Nothing new here. It is recommended that you put parentheses around your function rules first before doing anything else.

$$\begin{align}f(x)-g(x)&=(x^2+1)-(x^3-3x^2-1)\\&=x^2+1-x^3+3x^2+1\\&=-x^3+4x^2+2\end{align}$$

Above, we distributed the negative out in front of \(x^3-3x^2-1\) and then combined like-terms. Again, nothing new here. The same suggestion is made: to put each function’s rule in parentheses before performing any algebraic gymnastics. In this case, doing so is important because without the parentheses around the \(x^3-3x^2-1\), we wouldn’t know to distribute the minus sign as we did above.

$$\begin{align}f(x)\cdot g(x)&=(x^2+1)(x^3-3x^2-1)\\&=x^5-3x^4-x^2+x^3-3x^2-1\\&=x^5-3x^4-4x^2-1\end{align}$$

Here, all we needed to do was distribute as usual after we replaced \(f(x)\) and \(g(x)\) with the rule for each (in parentheses).

$$\begin{align}\frac{g(x)}{f(x)}&=\frac{x^3-3x^2-1}{x^2+1}\end{align}$$

All we did above was put the rule for the function \(g\) in the numerator, and the rule for \(f\) in the denominator. We cannot do anything more to simplify this by factoring the top or bottom, so the result is what you see. Often, however, we are able to simplify these sorts of rational expressions by factoring and cancelling as usual.

When finding the sum, difference, etc. of functions, you are effectively creating a new function from the old ones! This idea is indirectly baked into the notations you see below.


Combining Functions and Computing Outputs

Technically, when combining function rules as seen above, you are technically combining the outputs of the two functions on some input \(x\).

So, if you see a problem that asks you to compute \((f+g)(2)\) for example, this means you should compute \(f(2)+g(2)\); that is, find the output of \(f\) and \(g\) on input \(x=2\) respectively and then add the results; that is, combine the outputs.

From the above observation, \((f+g)(0)=f(0)+g(0)\), so we just need to compute \(f(0)\) and \(g(0)\) and add the results! Thus, we have

$$\begin{align}f(0)=(0)^2+1=1& \text{and} & g(0)=(0)^3-2(0)^2+4=4\end{align}$$

Therefore, based on these results,

$$\begin{align}(f+g)(0)=f(0)+g(0)=1+4=5\end{align}$$

Alternatively, one can compute the rule for \((f+g)(x)\) and then plug \(x=0\) into the result. Viz:

$$\begin{align}(f+g)(x)&=f(x)+g(x)\\&=(x^2+1)+(x^3-2x^2+4)\\&=x^3-x^2+5\end{align}$$

Now plug in \(x=0\) to get the final answer:

$$\begin{align}(f+g)(0)&=(0)^3-(0)^2+5\\&=0\end{align}$$

Note that the above answer matches the one we got from the first method. This is no accident. Remember that, in any function rule, \(x\) represents a generic input. So when we simplify the expression that we’d get for \((f+g)(x)\) (or, more accurately, \(f(x)+g(x)\)) we are effectively combining the outputs of \(f\) and \(g\) on input \(x\). So, it makes sense that if we plug in something specific, like \(x=0\), the result of adding together the function rules first and then substituting gives the same result as computing \(f(0)\) and \(g(0)\) and adding the results.


Handling Functions Involved in Any Algebraic Expression

In general, if you see any algebraic operation that involves at least one function, all one needs to do to evaluate the result and simplify the expression is substitute the given functions’ rules into the expression at every place the functions’ names appear, and then simplify.

General method: every place you see \(f(x)\) in the given expression, replace \(f(x)\) with its rule, and simplify until you can’t no more.

$$\begin{align}\sqrt[3]{f(x)}-x^2&=\sqrt[3]{(x^2+1)^3}\\&=(x^2+1)-x^2\\&=1\end{align}$$

\((f+g)(x)=x^2+x-2\)

\((f-g)(x)=-x^2+x-4\)

\((fg)(x)=x^3-3x^2+x-3\)

\((f/g)(x)=\frac{x-3}{x^2+1}\)

\((f+g)(x)=5x^2-3x+4\)

\((f-g)(x)=-3x^2+3x+2\)

\((fg)(x)=4x^4-3x^3+13x^2-9x+3\)

\((f/g)(x)=\frac{x^2+3}{4x^2-3x+1}\)

\((f+g)(3)=20\)

\((f-g)(-1)=-6\)

\((fg)(-2)=126\)

\((f/g)(1)=-\frac{1}{3}\)

\((f+g)(2)=13\)

\((f-g)(2)=9\)

\((fg)(-3)=312\)

\((f/g)(0)\) Does Not Exist! (Division by 0 issues)

\(\sqrt[3]{f(x)}=\sqrt[3]{5x^2+1}\)

\(\frac{1}{f(x)}=\frac{1}{5x^2+1}\)

\(3f(x)-5h(x)=3x^2-5x+5\)

\(xf(x)+(x+1)h(x)=x^3+x^2-1\)

Scroll to Top