Arithmetic Operations on Functions

Combining Functions

Just like numbers, functions can be added, subtracted, multiplied, and divided.

Given two functions f(x)f(x) and g(x)g(x), we can create new functions:


The Four Operations

Addition:

(f+g)(x)=f(x)+g(x)(f + g)(x) = f(x) + g(x)

Subtraction:

(fg)(x)=f(x)g(x)(f - g)(x) = f(x) - g(x)

Multiplication:

(fg)(x)=f(x)g(x)(f \cdot g)(x) = f(x) \cdot g(x)

Division:

(fg)(x)=f(x)g(x),g(x)0\left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}, \quad g(x) \neq 0


Example

Let f(x)=x2f(x) = x^2 and g(x)=x+1g(x) = x + 1.

Addition:

(f+g)(x)=x2+(x+1)=x2+x+1\begin{aligned} (f + g)(x) &= x^2 + (x + 1) \\ &= x^2 + x + 1 \end{aligned}

Subtraction:

(fg)(x)=x2(x+1)=x2x1\begin{aligned} (f - g)(x) &= x^2 - (x + 1) \\ &= x^2 - x - 1 \end{aligned}

Multiplication:

(fg)(x)=x2(x+1)=x3+x2\begin{aligned} (f \cdot g)(x) &= x^2(x + 1) \\ &= x^3 + x^2 \end{aligned}

Division:

(fg)(x)=x2x+1\left(\frac{f}{g}\right)(x) = \frac{x^2}{x + 1}


Evaluating at a Point

To find (f+g)(3)(f + g)(3), you can either:

Method 1: Combine first, then evaluate

(f+g)(x)=x2+x+1(f+g)(3)=9+3+1=13\begin{aligned} (f + g)(x) &= x^2 + x + 1 \\ (f + g)(3) &= 9 + 3 + 1 = 13 \end{aligned}

Method 2: Evaluate each, then combine

f(3)=9g(3)=4(f+g)(3)=9+4=13\begin{aligned} f(3) &= 9 \\ g(3) &= 4 \\ (f + g)(3) &= 9 + 4 = 13 \end{aligned}

Both give the same result.


Domain of Combined Functions

The domain of a combined function is where both original functions are defined.

Example: f(x)=xf(x) = \sqrt{x} and g(x)=4xg(x) = \sqrt{4 - x}

  • Domain of ff: x0x \geq 0
  • Domain of gg: x4x \leq 4
  • Domain of f+gf + g: 0x40 \leq x \leq 4

The combined domain is the intersection of the individual domains.


Division Requires Extra Care

For fg\dfrac{f}{g}, we must also exclude where g(x)=0g(x) = 0.

Example: f(x)=xf(x) = x and g(x)=x2g(x) = x - 2

  • Domain of ff: all real numbers
  • Domain of gg: all real numbers
  • Domain of fg\dfrac{f}{g}: all real numbers except x=2x = 2

We exclude x=2x = 2 because g(2)=0g(2) = 0 would make us divide by zero.