# Composite Functions

## Introduction

After learning about the definition of a function we learned about how to evaluate a function at a real number. Recalling how this is defined, if we want to evaluate a function f(x) at x = 5, we would replace all occurrences of x with 5, and simplify. For composite functions, instead of replacing the independent variable, usually x, with a number, we replace it with a function.

## Definition and notation

Given two functions, f and g, the composite function, denoted $f\circ g$ , is a function where $(f\circ g)(x)=f(g(x))$ .

Example:

Suppose $f(x)={\frac {1+x}{x-3}}{\text{ and }}g(x)={\sqrt {x}}[itex]Then[itex]()f\circ g)(x)={\frac {1+{\sqrt {x}}}{{\sqrt {x}}-3}}$ ## Domain

The domain of a composite function $(f\circ g)(x)$ is the collection of x-values in the domain of g such that g(x) is in the domain of f.

Example: Find the domain of $f\circ g{\text{ if }}f(x)={\frac {1}{x+1}}{\text{ and }}g(x)={\frac {1}{x+3}}$ We start by noting that the domain of g(x) is $(-\infty ,3)\cup (3,\infty )$ . Now we want to know for what values of x is g(x) = -1. So we solve: $-1={\frac {1}{x+3}}$ . Solving this equation we find that g(-4) = -1. So -4 must be removed from the domain of g to result in th domain of $f\circ g$ . To finish the problem: the domain of $f\circ g{\text{ is }}(-\infty ,-4)\cup (-4,3)\cup (3,\infty )$ 