# Functions

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

## Introduction

Functions are the main tool used in modeling applications. Functions are a way to associate one element from the domain to one element of the range. For example, associating a video game with its cost at a local video game score. Each game has a unique price. The distinguishing factor for functions is being able to associate each element in the domain, in our example the domain is the collection of products, with an element of the range, the prices of games.

## When Equations are Functions

An equation involving x and y is a function if there is a unique value of y for each value of x.

Example: y + 5x = 3

Non-example: ${\displaystyle x^{2}+y^{2}=1}$ This is a non-example since we can solve for y and find that ${\displaystyle y=\pm {\sqrt {1-x^{2}}}}$. So for each value of x, we do not know which value of y to select, the positive or negative one.

## Difference Quotient

Given a function f(x), the difference quotient of a function at x is defined by, ${\displaystyle {\frac {f(x+h)-f(x)}{h}}{\text{ for }}h\neq 0}$.

Example: Find the difference quotient for ${\displaystyle f(x)=x^{2}-4x}$ By definition the difference quotient is ${\displaystyle {\frac {(x+h)^{2}-4(x+h)-(x^{2}-4x)}{h}}}$ This expression simplifies to ${\displaystyle {\frac {2xh+h^{2}-4h}{h}}=2x+h-4}$.

## Domain of a Function

The domain of the function can be thought of as the set of x-values such that the expression makes sense for those values of x. An expression makes sense if the value of x does not lead to division by zero or taking the square root of a negative number. An equivalent way of thinking of the domain is to start by assuming the domain is all real numbers, and remove any x-values that lead to division by zero or square rooting a negative number.

Example: Find the domain of the following: a) ${\displaystyle {\frac {3x}{x^{2}-4}}}$

b) ${\displaystyle {\frac {\sqrt {3x+12}}{x-5}}}$

Solution:

a) Here we only have a fraction and no square root. So we only need to make sure we do not divide by zero. So we want to make sure ${\displaystyle x^{2}-4\neq 0}$ That is ${\displaystyle x\neq \pm 2}$.

b) Here we have to make sure we do not divide by zero or take the square root of a negative number. So ${\displaystyle x-5\neq 0{\text{ and }}3x+12\geq 0}$ This means ${\displaystyle x\neq 5{\text{ and }}x\geq -4.}$

## Properties of functions

Now we discuss a few properties of functions.

If f and g are functions: a) ${\displaystyle (f+g)(x)=f(x)+g(x)}$

b) ${\displaystyle (f-g)(x)=f(x)-g(x)}$

c) ${\displaystyle (f\cdot g)(x)=f(x)\cdot g(x)}$

d) ${\displaystyle \left({\frac {f}{g}}\right)(x)={\frac {f(x)}{g(x)}}~g(x)\neq 0}$