Operations on Functions

Addition, Subtraction, Multiplication, Division, Domains, and Step-by-Step Examples

The operations on functions are presented with examples including detailed solutions and explanations. Solve and understand the examples before attempting the questions which also have detailed solutions.

Operations on Functions Definition and Domain

Functions with real output may be combined using addition, subtraction, multiplication, and division as we do with real numbers.

Let \( f \) and \( g \) be two functions with real outputs. The functions \( f + g \), \( f - g \), \( f \cdot g \), and \( \dfrac{f}{g} \) are defined as follows:

  1. \( (f + g)(x) = f(x) + g(x) \) — addition (sum of two functions)
  2. \( (f - g)(x) = f(x) - g(x) \) — subtraction (difference of two functions)
  3. \( (f \cdot g)(x) = f(x) \cdot g(x) \) — multiplication (product of two functions)
  4. \( \left(\dfrac{f}{g} \right)(x) = \dfrac{f(x)}{g(x)} \) — division (quotient of two functions)

The domain of \( f + g \), \( f - g \), and \( f \cdot g \) is the set \( D \) of all values of \( x \) that are common to the domain of \( f \) and the domain of \( g \). If \( D_f \) is the domain of \( f \) and \( D_g \) is the domain of \( g \), then \( D \) is the intersection of \( D_f \) and \( D_g \):

\[ D = D_f \cap D_g \]

The domain of \( \dfrac{f}{g} \) is the set \( D \) such that \( g(x) \neq 0 \).

Note: Two functions may also be combined by composition of functions.

Examples with Solutions and Explanations

Example 1

Function \( f \) is given by a table of values and function \( g \) is graphed below.

\( x \)\( f(x) \)
-2-4
-110
07
18
211

graph of function g

Evaluate, if possible:
a) \( (f + g)(2) \),     b) \( (g - f)(0) \),     c) \( (f \cdot g)(-2) \),     d) \( (g \cdot f)(1) \),     e) \( \left(\dfrac{f}{g}\right)(1) \),     f) \( \left(\dfrac{f}{g}\right)(-1) \)

View Solution

a) \( (f + g)(2) = f(2) + g(2) \)
From table: \( f(2) = 11 \). From graph: \( g(2) = -3 \).
\( (f + g)(2) = 11 + (-3) = 8 \)

b) \( (g - f)(0) = g(0) - f(0) = -3 - 7 = -10 \)

c) \( (f \cdot g)(-2) = f(-2) \cdot g(-2) = (-4)(5) = -20 \)

d) \( (g \cdot f)(1) = g(1) \cdot f(1) = (-4)(8) = -32 \)

e) \( \left(\dfrac{f}{g} \right)(1) = \dfrac{f(1)}{g(1)} = \dfrac{8}{-4} = -2 \)

f) \( \left(\dfrac{f}{g} \right)(-1) = \dfrac{f(-1)}{g(-1)} = \dfrac{10}{0} = \text{undefined} \) (division by zero).

Example 2

Let \( f(x) = 2x^2 + 3x + 1 \) and \( g(x) = 3x + 2 \).
a) Evaluate \( (f + g)(0) \), \( (f - g)(-1) \), \( (f \cdot g)(1) \), \( \left(\dfrac{f}{g}\right)(2) \), and \( \left(\dfrac{g}{f}\right)(-1) \).
b) Find the functions \( (f + g)(x) \), \( (f - g)(x) \), \( (f \cdot g)(x) \), and \( \left(\dfrac{f}{g}\right)(x) \).

View Solution

a)
\( (f + g)(0) = f(0) + g(0) = (2(0)^2 + 3(0) + 1) + (3(0) + 2) = 3 \)
\( (f - g)(-1) = f(-1) - g(-1) = (2(-1)^2 + 3(-1) + 1) - (3(-1) + 2) = 1 \)
\( (f \cdot g)(1) = f(1) \cdot g(1) = (2(1)^2 + 3(1) + 1)(3(1) + 2) = (6)(5) = 30 \)
\( \left(\dfrac{f}{g}\right)(2) = \dfrac{f(2)}{g(2)} = \dfrac{2(2)^2 + 3(2) + 1}{3(2) + 2} = \dfrac{15}{8} \)
\( \left(\dfrac{g}{f}\right)(-1) = \dfrac{g(-1)}{f(-1)} = \dfrac{3(-1) + 2}{2(-1)^2 + 3(-1) + 1} = \dfrac{-1}{0} = \text{undefined} \)

b)
\( (f + g)(x) = (2x^2 + 3x + 1) + (3x + 2) = 2x^2 + 6x + 3 \)
\( (f - g)(x) = (2x^2 + 3x + 1) - (3x + 2) = 2x^2 - 1 \)
\( (f \cdot g)(x) = (2x^2 + 3x + 1)(3x + 2) = 6x^3 + 13x^2 + 9x + 2 \)
\( \left(\dfrac{f}{g}\right)(x) = \dfrac{2x^2 + 3x + 1}{3x + 2} \)

Example 3

Let \( f(x) = \sqrt{x-1} \) and \( g(x) = x - 5 \). Find the domains of \( f + g \), \( f - g \), \( f \cdot g \), and \( \dfrac{f}{g} \).

View Solution

The domain of \( f \) requires \( x - 1 \ge 0 \implies x \ge 1 \) or \( D_f = [1, +\infty) \).
The domain of \( g \) is all real numbers: \( D_g = (-\infty, +\infty) \).
The intersection is \( D_f \cap D_g = [1, +\infty) \).

domain of operations on functions, example 3

The domain for \( f+g \), \( f-g \), and \( f \cdot g \) is \( [1, +\infty) \).
For \( \dfrac{f}{g} \), we also require \( g(x) \neq 0 \implies x - 5 \neq 0 \implies x \neq 5 \).
Thus, the domain of \( \dfrac{f}{g} \) is \( [1, 5) \cup (5, +\infty) \).

Example 4

Let \( f(x) = \sqrt{x+1} \) and \( g(x) = \sqrt{9-x^2} \). Find the domains of \( f + g \), \( f - g \), \( f \cdot g \), and \( \dfrac{f}{g} \).

View Solution

Domain of \( f \): \( x + 1 \ge 0 \implies D_f = [-1, +\infty) \).
Domain of \( g \): \( 9 - x^2 \ge 0 \implies D_g = [-3, 3] \).

domain of operations on functions, example 4

Intersection: \( D_f \cap D_g = [-1, 3] \).
This is the domain for \( f+g \), \( f-g \), and \( f \cdot g \).
For \( \dfrac{f}{g} \), \( g(x) \neq 0 \implies x \neq -3, 3 \). Since \(-3\) is not in \([-1, 3]\), we only exclude \( x = 3 \).
The domain of \( \dfrac{f}{g} \) is \( [-1, 3) \).

Example 5

Let \( f(x) = \dfrac{1-x}{x+2} \) and \( g(x) = \dfrac{x-1}{x+4} \). Find \( \dfrac{f}{g} \) and \( \dfrac{g}{f} \) and their domains.

View Solution

\( \left(\dfrac{f}{g}\right)(x) = \dfrac{\dfrac{1-x}{x+2}}{\dfrac{x-1}{x+4}} = \left(\dfrac{1-x}{x+2}\right)\left(\dfrac{x+4}{x-1}\right) = -\dfrac{x+4}{x+2} \)
\( \left(\dfrac{g}{f}\right)(x) = -\dfrac{x+2}{x+4} \)

domain of operations on functions, example 5

\( D_f = (-\infty, -2) \cup (-2, +\infty) \)
\( D_g = (-\infty, -4) \cup (-4, +\infty) \)
\( D_f \cap D_g = (-\infty, -4) \cup (-4, -2) \cup (-2, +\infty) \)
For \( \dfrac{f}{g} \) and \( \dfrac{g}{f} \), we also require \( g(x) \neq 0 \) and \( f(x) \neq 0 \), which implies \( x \neq 1 \).
Domain: \( (-\infty, -4) \cup (-4, -2) \cup (-2, 1) \cup (1, +\infty) \).

Questions on Operations on Functions

  1. Functions \( f \) and \( g \) are given by table of values:
    \( x \)\( f(x) \)\( x \)\( g(x) \)
    -2-4-23
    -110-1-4
    0719
    102-2
    21130
    a) Evaluate: \( (f - g)(-1) \), \( (g + f)(0) \), \( (f \cdot g)(2) \), \( (g \cdot f)(1) \), \( \left(\dfrac{g}{f}\right)(1) \), \( \left(\dfrac{f}{g}\right)(1) \).
    b) Find the domains of \( f + g \), \( f - g \), \( f \cdot g \), \( \dfrac{f}{g} \), and \( \dfrac{g}{f} \).
  2. Let \( f(x) = \sqrt{-x-5} \) and \( g(x) = |x - 7| \). Evaluate \( (f + g)(0) \), \( (f - g)(-6) \), \( (f \cdot g)(-9) \), and \( \left(\dfrac{f}{g}\right)(-30) \).
  3. Let \( f(x) = 2x + 14 \) and \( g(x) = x + 7 \). Find \( (f + g)(x) \), \( (f - g)(x) \), \( (f \cdot g)(x) \), \( \left(\dfrac{f}{g}\right)(x) \), \( \left(\dfrac{g}{f}\right)(x) \), and their domains.
  4. Let \( f(x) = \dfrac{x-2}{x+3} \) and \( g(x) = \dfrac{x+5}{x - 1} \). Find the domains of \( \dfrac{f}{g} \) and \( \dfrac{g}{f} \).

Solutions to the Above Questions

Solution to Question 1

View Solution

a)
\( (f - g)(-1) = f(-1) - g(-1) = 10 - (-4) = 14 \)
\( (g + f)(0) = g(0) + f(0) = \text{undefined} \) (since \( g(0) \) is not in the table)
\( (f \cdot g)(2) = f(2) \cdot g(2) = (11)(-2) = -22 \)
\( (g \cdot f)(1) = g(1) \cdot f(1) = (9)(0) = 0 \)
\( \left(\dfrac{g}{f}\right)(1) = \dfrac{g(1)}{f(1)} = \dfrac{9}{0} = \text{undefined} \)
\( \left(\dfrac{f}{g}\right)(1) = \dfrac{f(1)}{g(1)} = \dfrac{0}{9} = 0 \)

b)
\( D_f = \{-2, -1, 0, 1, 2\} \), \( D_g = \{-2, -1, 1, 2, 3\} \)
Intersection \( D_f \cap D_g = \{-2, -1, 1, 2\} \) (domain for \( f+g, f-g, f \cdot g \)).
Domain of \( \dfrac{f}{g} \): exclude \( g(x) = 0 \implies x = 3 \) (not in intersection). Result: \(\{-2, -1, 1, 2\}\).
Domain of \( \dfrac{g}{f} \): exclude \( f(x) = 0 \implies x = 1 \). Result: \(\{-2, -1, 2\}\).

Solution to Question 2

View Solution

\( (f + g)(0) = \sqrt{-0-5} + |0-7| = \sqrt{-5} + 7 = \text{not real} \)
\( (f - g)(-6) = \sqrt{-(-6)-5} + |-6-7| = \sqrt{1} + |-13| = 1 + 13 = 14 \)
\( (f \cdot g)(-9) = \sqrt{-(-9)-5} \cdot |-9-7| = \sqrt{4} \cdot |-16| = (2)(16) = 32 \)
\( \left(\dfrac{f}{g}\right)(-30) = \dfrac{\sqrt{-(-30)-5}}{|-30-7|} = \dfrac{\sqrt{25}}{|-37|} = \dfrac{5}{37} \)

Solution to Question 3

View Solution

\( (f + g)(x) = (2x + 14) + (x + 7) = 3x + 21 \)
\( (f - g)(x) = (2x + 14) - (x + 7) = x + 7 \)
\( (f \cdot g)(x) = (2x + 14)(x + 7) = 2x^2 + 28x + 98 \)
\( \left(\dfrac{f}{g}\right)(x) = \dfrac{2x + 14}{x + 7} = \dfrac{2(x+7)}{x+7} = 2 \) for \( x \neq -7 \)
\( \left(\dfrac{g}{f}\right)(x) = \dfrac{x + 7}{2x + 14} = \dfrac{x+7}{2(x+7)} = \dfrac{1}{2} \) for \( x \neq -7 \)

Domains of \( f+g, f-g, f \cdot g \): \( (-\infty, +\infty) \).
Domain of \( \dfrac{f}{g} \) and \( \dfrac{g}{f} \): \( (-\infty, -7) \cup (-7, +\infty) \).

Solution to Question 4

View Solution

\( D_f = (-\infty, -3) \cup (-3, +\infty) \)
\( D_g = (-\infty, 1) \cup (1, +\infty) \)
\( D_f \cap D_g = (-\infty, -3) \cup (-3, 1) \cup (1, +\infty) \)

Domain of \( \dfrac{f}{g} \): exclude \( g(x) = 0 \implies x = -5 \). Result: \( (-\infty, -3) \cup (-3, -5) \cup (-5, 1) \cup (1, +\infty) \).
Domain of \( \dfrac{g}{f} \): exclude \( f(x) = 0 \implies x = 2 \). Result: \( (-\infty, -3) \cup (-3, 1) \cup (1, 2) \cup (2, +\infty) \).

More References and Links