Skip to main content

Section 10.2 Operations on Functions

Objective: Combine functions using sum, difference, product, quotient and composition of functions.

Several functions can work together in one larger function. There are \(5\) common operations that can be performed on functions. The four basic operations on functions are adding, subtracting, multiplying, and dividing. The notation for these functions is as follows.

\begin{align*} \text{Addition} \amp \quad (f+g)(x)=f(x)+g(x) \\ \text{Subtraction} \amp\quad (f-g)(x)=f(x)-g(x) \\ \text{Multiplication} \amp\quad (f \cdot g)(x)=f(x)g(x) \\ \text{Division} \amp\quad \left(\frac{f}{g}\right)(x)= \frac{f(x)}{g(x)} \end{align*}

When we do one of these four basic operations we can simply evaluate the two functions at the value and then do the operation with both solutions

Example 10.2.1.

\begin{align*} f(x)=x^2-x-2 \amp \quad \\ g(x)=x+1 \amp\quad \text{Evaluate $f$ and $g$ at } -3 \\ \text{find } (f+g)(-3) \amp\quad \\ \\ f(-3)=(-3)^2 –(-3)-2 \amp\quad \text{Evaluate $f$ at } -3 \\ f(-3)=9+3-2 \amp\quad \\ f(-3)=10 \amp\quad \\ \\ g(-3)=(-3)+1 \amp\quad \text{ Evaluate $g$ at } -3 \\ g(-3)=-2 \amp\quad \\ \\ f(-3)+g(-3) \amp\quad \text{Add the two functions together} \\ (10)+(-2) \amp\quad \text{Add} \\ 8 \amp\quad \text{Our Solution} \end{align*}

The process is the same regardless of the operation being performed.

Example 10.2.2.

\begin{align*} h(x)=2x-4 \amp \quad \\ k(x)=-3x+1 \amp\quad \text{Evaluate $h$ and $k$ at} 5 \\ \text{find } (h\cdot k)(5) \amp\quad \\ \\ h(5)=2(5)-4 \amp\quad \text{Evaluate $h$ at } 5 \\ h(5)=10-4 \amp\quad \\ h(5)=6 \amp\quad \\ \\ k(5)=-3(5)+1 \amp\quad \text{ Evaluate $k$ at } 5 \\ k(5)=-15+1 \amp\quad \\ k(5)=-14 \amp\quad \\ \\ h(5)k(5) \amp\quad \text{Multiply the two results together} \\ (6)(-14) \amp\quad \text{ Multiply } \\ -84 \amp\quad \text{Our Solution} \end{align*}

Often as we add, subtract, multiply, or divide functions, we do so in a way that keeps the variable. If there is no number to plug into the equations we will simply use each equation, in parenthesis, and simplify the expression.

Example 10.2.3.

\begin{align*} f(x)=2x-4 \amp \quad \\ g(x)=x^2-x+5 \amp\quad \text{Write subtraction problem of functions} \\ \text{Find } (f-g)(x) \amp\quad \\ \\ f(x)-g(x) \amp\quad \text{Replace $f(x)$ with $(2x-3)$ and $g(x)$ with } (x^2-x+5) \\ (2x-4)-(x^2-x+5) \amp\quad \text{Distribute the negative} \\ 2x-4-x^2+x-5 \amp\quad \text{Combine like terms} \\ -x^2+3x-9 \amp\quad \text{Our Solution} \end{align*}

The parentheses are very important when we are replacing \(f(x)\) and \(g(x)\) with a variable. In the previous example we needed the parenthesis to know to distribute the negative.

Example 10.2.4.

\begin{align*} f(x)=x^2-4x-5 \amp \quad \\ g(x)=x-5 \amp\quad \text{Write division problem of functions} \\ \text{Find } \left(\frac{f}{g}\right)(x) \amp\quad \\ \\ \frac{f(x)}{g(x)} \amp\quad \text{Replace $f(x)$ with $(x^2-4x-5)$ and $g(x)$ with } (x-5) \\ \frac{(x^2-4x-5)}{(x-5)}\amp\quad \text{To simplify the fraction we must first factor } \\ \frac{(x-5)}{(x+1)} \amp\quad \text{Divide out common factor of } x-5 \\ x+1 \amp\quad \text{Our Solution} \end{align*}

Just as we could substitute an expression into evaluating functions, we can substitute an expression into the operations on functions.

Example 10.2.5.

\begin{align*} f(x)=2x-1 \amp \quad \\ g(x)=x+4 \amp\quad \text{Write as a sum of functions} \\ \text{Find } (f+g)(x^2) \amp\quad \\ \\ f(x^2)+g(x^2) \amp\quad \text{Replace $x$ in $f(x)$ and $g(x)$ with } (x-5) \\ [2(x^2)-1]+[(x^2)+4]\amp\quad \text{To simplify the fraction we must first factor } \\ 2x^2-1+x^2+4 \amp\quad \text{Distribute the $+$ does not change the problem} \\ 3x^3+3 \amp\quad \text{Our Solution} \end{align*}

Example 10.2.6.

\begin{align*} f(x)=2x-1 \amp \quad \\ g(x)=x+4 \amp\quad \text{Write as a product of functions} \\ \text{Find } (f\cdot g)(3x) \amp\quad \\ \\ f(3x)g(3x) \amp\quad \text{Replace $x$ in $f(x)$ and $g(x)$ with } (3x) \\ [2(3x)-1]+[(3x)+4]\amp\quad \text{Multiply our }2(3x) \\ (6x-1)(3x+4)\amp\quad \text{FOIL} \\ 18x^2+24x-3x-4 \amp\quad \text{Combine like terms } \\ 18x^2+21x-4 \amp\quad \text{Our Solution} \end{align*}

The fifth operation of functions is called composition of functions. A composition of functions is a function inside of a function. The notation used for composition of functions is:

\begin{equation*} \mathbf{ (f\circ g)(x)=f(g(x))} \end{equation*}

To calculate a composition of function we will evaluate the inner function and substitute the answer into the outer function. This is shown in the following example.

Example 10.2.7.

\begin{align*} a(x)=x^2-2x+1 \amp \quad \\ b(x)=x-5 \amp\quad \text{Rewrite as a function in function} \\ \text{Find } (a\circ b)(3) \amp \quad \\ \\ a(b(3)) \amp\quad \text{Evaluate the inner function in function} \\ b(3)=(3)-5=-2 \amp \quad \text{This solution is put into } a, a(-2) \\ a(-2)=(-2)^2-2(-2)+1 \amp\quad \text{Evaluate} \\ a(-2)=4+4+1 \amp\quad \text{Add} \\ a(-2)=9 \amp\quad \text{Our Solution} \end{align*}

We can also evaluate a composition of functions at a variable. In these problems we will take the inside function and substitute into the outside function.

Example 10.2.8.

\begin{align*} f(x)=x^2-x \amp \quad \\ g(x)=x+3 \amp\quad \text{Rewrite as a function in function} \\ \text{Find } (f\circ g)(x) \amp \quad \\ \\ f(g(x)) \amp\quad \text{Replace $g(x)$ with } x+3 \\ f(x)=(x+3) \amp \quad \text{Replace the variable in $f$ with } (x+3) \\ (x+3)^2-(x+3) \amp\quad \text{Evaluate exponent} \\ (x^2+6x+9)-(x-3) \amp\quad \text{Distribute negative} \\ x^2+6x+9-x-3 \amp\quad \text{Combine like terms } \\ x^2+5x+6 \amp\quad \text{Our Solution} \end{align*}

It is important to note that very rarely is \((f \circ g)(x)\) the same as \((g \circ f)(x)\) as the following example will show, using the same equations, but compositing them in the opposite direction.

Example 10.2.9.

\begin{align*} f(x)=x^2-x \amp \quad \\ g(x)=x+3 \amp\quad \text{Rewrite as a function in function} \\ \text{Find } (g\circ f)(x) \amp \quad \\ \\ g(f(x)) \amp\quad \text{Replace $f(x)$ with } x^2-x \\ g(x^2-x) \amp \quad \text{Replace the variable in $g$ with } (x^2-x) \\ (x^2-x)+3 \amp\quad \text{Here the parenthesis don’t change the expression} \\ x^2-x+3 \amp\quad \text{Our Solution} \end{align*}

World View Note: The term “function” came from Gottfried Wihelm Leibniz, a German mathematician from the late \(17\)th century.

Exercises Exercises – Operations on Functions

Exercise Group.

Perform the indicated operations.

1.

\(g(a)=a^3 +5a^2\)

\(\quad f(a)=2a+4 \)

\(\quad \text{Find } g(3)+f(3) \)

2.

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

\(\quad g(x)=2x+5 \)

\(\quad \text{Find } f(-4) \div g(-4) \)

3.

\(g(a)=3a +3\)

\(\quad f(a)=2a-2 \)

\(\quad \text{Find } (g + f)(9) \)

4.

\(g(x)=4x+3\)

\(\quad h(x)=x^3 + 3x^2 \)

\(\quad \text{Find } (g-h)(-1)\)

5.

\(g(x)=x+3\)

\(\quad f(x)=-x+4 \)

\(\quad \text{Find } (g -f)(3) \)

6.

\(g(x)=-4x+1\)

\(\quad h(x)=-2x-1 \)

\(\quad \text{Find } g(5)+h(5) \)

7.

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

\(\quad f(x)=2x+5 \)

\(\quad \text{Find } (g-f)(0) \)

8.

\(g(a)=3x+1\)

\(\quad f(a)=x^3+3x^2 \)

\(\quad \text{Find } g(2) \cdot f(2) \)

9.

\(g(t)=t-3\)

\(\quad h(t)=-3T^3 +6t \)

\(\quad \text{Find } g(1)+h(1) \)

10.

\(f(n)=n-5\)

\(\quad g(n)=4n+2 \)

\(\quad \text{Find } (f+g)(-8)\)

11.

\(h(t)=t+5\)

\(\quad g(t)=3t-5 \)

\(\quad \text{Find } (h \cdot g)(5) \)

12.

\(g(a)=3a -2\)

\(\quad h(a)=4a+2 \)

\(\quad \text{Find } (g+h)(-10) \)

13.

\(g(n)=2n-1\)

\(g(n)=3n-5 \)

\(\quad \text{Find } h(0) \div g(0) \)

14.

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

\(\quad h(x)=2x+5 \)

\(\quad \text{Find } g(-6)+h(-6) \)

15.

\(f(a)=-2a - 4\)

\(\quad g(a)=a^2 + 3 \)

\(\quad \text{Find } \left(\frac{f}{g}\right)(7) \)

16.

\(g(n) = n^-3\)

\(\quad h(n)=2n-3 \)

\(\quad \text{Find } (g – h)(n) \)

17.

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

\(\quad h(x)= 4x \)

\(\quad \text{Find } (g – h)(x) \)

18.

\(g(x)=2x - 3\)

\(\quad h(x)=x^3 - 2x^2 + 2x \)

\(\quad \text{Find } (g – h)(x) \)

19.

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

\(\quad g(x)= x^2 + 5x \)

\(\quad \text{Find } (f - g)(x) \)

20.

\(g(t)=t - 4\)

\(\quad h(a)= 2t\)

\(\quad \text{Find } (g \cdot h)(t) \)

21.

\(g(x)=4x + 5\)

\(\quad h(x)= x^2 + 5x \)

\(\quad \text{Find } g(x) \cdot h(x) \)

22.

\(g(t)= - 2t^2 – 5t \)

\(\quad h(t)=t + 5 \)

\(\quad \text{Find } g(x) \cdot h(x) \)

23.

\(f(x)=x^2 - 5x\)

\(\quad g(x)=x+5 \)

\(\quad \text{Find } ( f + g)( x ) \)

24.

\(f(x)=4x -4\)

\(\quad g(x)=3x^2 - 5 \)

\(\quad \text{Find } ( f + g)( x ) \)

25.

\(g(n)=n^2 + 5\)

\(\quad f(n)= 3n + 5 \)

\(\quad \text{Find } g(n) \div f(n) \)

26.

\(f(x)=2x + 4\)

\(\quad g(x)= 4x - 5 \)

\(\quad \text{Find } f(x) – g(x) \)

27.

\(g(a)=-2a +5\)

\(\quad f(a)=3a + 5 \)

\(\quad \text{Find } \left(\frac{g}{f}\right)(a) \)

28.

\(g(t)=t^3 + 3t^2 \)

\(\quad h(t)=3t - 5 \)

\(\quad \text{Find } g(3)+f(3) \)

29.

\(h(n) = n^3 + 4n\)

\(\quad g(n)=4n +5 \)

\(\quad \text{Find } h(n) + g(n) \)

30.

\(f(x)=4x +2\)

\(\quad g(x)=x^2 + 2x \)

\(\quad \text{Find } f(x) \div g(x) \)

31.

\(g(n)=n^2 - 4n\)

\(\quad h(n)= n - 5 \)

\(\quad \text{Find } g(n^2) \cdot h(n^2) \)

32.

\(g(n)=n + 5\)

\(\quad f(a)=2n - 5 \)

\(\quad \text{Find } (g\cdot h)(-3n) \)

33.

\(f(x)=2x\)

\(\quad g(x)= -3x -1 \)

\(\quad \text{Find } (f+g)( -4 -x) \)

34.

\(g(a)=-2a\)

\(\quad h(a)=3a \)

\(\quad \text{Find } g(4a) \ frac h(4a) \)

35.

\(f(t)=t^2 + 4t\)

\(\quad g(t)=4t + 2\)

\(\quad \text{Find } f(t^2) + g(t^2) \)

36.

\(h(n)=3n - 2\)

\(\quad g(n)=- 3n^2 – 4n \)

\(\quad \text{Find } g(3)+f(3) \)

37.

\(g(a)=a^3 + 2a\)

\(\quad h(a)=3a+4 \)

\(\quad \text{Find } (g \div h) (3) \)

38.

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

\(\quad h(x)=x^2 - 5 \)

\(\quad \text{Find } g(x^2)+h(x^2) \)

39.

\(f(n) = -3n^2 + 1\)

\(\quad g(n)= 2n + 1 \)

\(\quad \text{Find } (f – g)(n \ frac 3) \)

40.

\(f(n)=3n + 4 \)

\(\quad g(n)=n^3 – 5n \)

\(\quad \text{Find } f(n \div 2) - g(n \div 2) \)

41.

\(f(x)=- 4x + 1\)

\(\quad g(x)= 4x + 3 \)

\(\quad \text{Find } ( f \circ g) (9)\)

42.

\(g(x)=x - 1\)

\(\quad \text{Find } ( g \circ g) (7)\)

43.

\(h(a)=3a + 3\)

\(\quad g(a)=a + 1 \)

\(\quad \text{Find } (h \circ g) (5) \)

44.

\(g(t)=t + 3\)

\(\quad h(t)=2t -5 \)

\(\quad \text{Find } (g \circ h) (3) \)

45.

\(g(x)=x + 4 \)

\(\quad h(x)=x^2 -1 \)

\(\quad \text{Find } (g \circ h ) (10) \)

46.

\(f(a)=2a-4\)

\(\quad g(a)=a^2+2a \)

\(\quad \text{Find } (f \circ g)(-4) \)

47.

\(f(n)=-4n+2\)

\(\quad g(n)=n+4 \)

\(\quad \text{Find } (f \circ g)(9) \)

48.

\(g(x)=3x+4\)

\(\quad h(x)=x^3+3x\)

\(\quad \text{Find } (g \circ h)(3) \)

49.

\(g(x)=2x-4\)

\(\quad h(x)= 2x^3+4x^2\)

\(\quad \text{Find } (g \circ h)(3) \)

50.

\(g(a)=a^2+3\)

\(\quad \text{Find } (g \circ g)(-3) \)

51.

\(g(x)=x^2-5x\)

\(\quad h(x)=4x+4 \)

\(\quad \text{Find } (g \circ h)(x) \)

52.

\(g(a)=2a+4 \)

\(\quad h(a)=-4a+5 \)

\(\quad \text{Find } (g \circ h)(a) \)

53.

\(f(a)=-2a+2\)

\(\quad g(a)=4a \)

\(\quad \text{Find } (f \circ g)(a) \)

54.

\(g(t)=-t-4\)

\(\quad \text{Find } (g \circ g)(t) \)

55.

\(g(x)=4x+4\)

\(\quad f(x)= x^3-1 \)

\(\quad \text{Find } (g \circ f)(x) \)

56.

\(f(n)=-2n^2-4n\)

\(\quad g(n)=n+2 \)

\(\quad \text{Find } (f \circ g)(n) \)

57.

\(g(t)=-x+5\)

\(\quad f(t)=2x-3 \)

\(\quad \text{Find } (g \circ f)(x) \)

58.

\(g(t)=t^3-t\)

\(\quad f(t)=3t-4 \)

\(\quad \text{Find } (g \circ f)(t) \)

59.

\(f(t)=4t+3\)

\(\quad g(t)=-4t-2 \)

\(\quad \text{Find } (f \circ g)(t) \)

60.

\(f(x)=3x- 4\)

\(\quad g(x)=x^3+2x^2 \)

\(\quad \text{Find } (f \circ g)(x) \)