# Functions Represented by Equations

  

It is very common in mathematics to represent a function by an equation or a formula. We shall present examples and questions, including their solutions, on functions given by equations. Questions related to domain and range of a function are also included.

## Dependent and Independent Variables of a Function

The equation $y = 2 x + 1$ represent a function that assigns exactly one value for $y$ for each value of $x$ in the domain of the function. We say that the variable $y$ is a function of the variale $x$.
$y$ is called the dependent variable and $x$ is called the independent variable since its value depends on $x$.

Example
Consider the function represented by the equation $y = 2 x + 1$.
Let $x$ take the values in the domain $D = \{ -2 , 0 , 1 , 2 \}$.
a) Calculate the range $R$ of values of $y$ corresponding to the given $x$ values in the domain $D$.
b) Represent the function using a table, a set of ordered pairs , a graph and Venn diagrams .
Solution
a)
Calculate the corresponding values of $y$ for the given values of $x$.
For $x = -2$ , $y = 2 (-2) + 1 = -3$
For $x = 0$ , $y = 2 (0) + 1 = 1$
For $x = 1$ , $y = 2 (1) + 1 = 3$
For $x = 2$ , $y = 2 (2) + 1 = 5$
$R = \{ -3 , 1 , 3 , 5 \}$
b)
Represent the given function as a table

 $x$ $-2$ $0$ $1$ $2$ $y$ $-3$ $1$ $3$ $5$

Represent the given function as a set of ordered pairs
$\{ \; (-2,-3) \; , \; (0,1) \; , \; (1,3) \; , \; (2,5) \}$

Represent the given function as a graph

Represent the given function as a Venn diagram

## Domain and Range of a Function Given by an Equation

The domain $D$ of a function is the set of all values of the independent variable $x$ for which the dependent $y$ variable is defined.
The range $R$ of a function is the set of all values of the dependent variable $y$ corresponding to the values of $x$ in the domain $D$.
Example
Find the domain of the functions $y$ as a function of $x$ defined by the equations:
a)   $y = 2 - x$
b)   $2 y - x = 4$
c)   $y = \dfrac{1}{x}$
d)   $y = \sqrt x$
Solution
a)
The dependent variable $y$ of the function given by $y = 2 - x$ is defined for any value $x$ in the set of the real numbers. Hence the domain of the given function is the set of all real numbers.
b)
We first need to solve for the independent variable $y$
Rewrite the given equation with the term in $y$ on the left as follows: $\quad 2 y = 4 + x$
Multiply all terms of the above equation by $\dfrac{1}{2}$: $\quad \dfrac{1}{2} 2 y = \dfrac{1}{2} 4 + \dfrac{1}{2} x$
Simplify to obtain: $\quad y = 2 + \dfrac{1}{2} x$
The dependent variable $y$ of the function given by $y = y = 2 + \dfrac{1}{2} x$ is defined for any value $x$ in the set of the real numbers. Hence the domain of the given function is the set of all real numbers.
c)
There is division on the right side of the given equation $y = \dfrac{1}{x}$ and it is known that a division by zero is not allowed in mathematics. Hence dependent variable $y$ of the function given by $y = \dfrac{1}{x}$ is defined for all value $x$ in the set of all real numbers except $x = 0$.
d)
There is square root on the right side of the given equation $y = \sqrt x$ and it is known that the square root of a negative number in not real in mathematics. Hence dependent variable $y$ of the function given by $y = \sqrt x$ is defined for all value $x$ in the set of all non negative real numbers.

Example
Find the range of the function $y = x^2 + 1$ for $x$ in the domain: $D = \{ 0 , 1 , 6 \}$
Solution
The range is the set of $y$ values for $x$ in the domain. The values in the range are calculated by substituting $x$ by its values in the domain.
For $x = 0$ , $\quad y = x^2 + 1 = 0^2 + 1 = 0 + 1 = 1$
For $x = 1$ , $\quad y = x^2 + 1 = 1^2 + 1 = 1 + 1 = 2$
For $x = 6$ , $\quad y = x^2 + 1 = 6^2 + 1 = 36 + 1 = 37$
Range: $\quad R = \{ 1 , 2,37 \}$
More advanced topics on domain and range are included.

## Not Any Equation Represents a Function

Example - Testing Equations for Functions
Which of the following equations represent $y$ as a function of $x$?
a) $x + y = 2$
b) $x + 5 = |y|$
d) $\dfrac{y}{x} = - 3$
c) $x + y^2 = 25$
Solution
a)
Solve the given equation for $y$ to obtain: $y = 2 - x$. The given equation represents $y$ as a function of $x$ because for each value of $x$, we have one value of $y$ only.
b)
Given equation $| y | = x + 5$. For both values of $y = 2$ and $y = - 2$, we obtain $| y | = 2$, hence $x = 5 - |y| = 5 - 2 = 3$. Therefore for one input $x = 3$, we have two outputs $y = - 2$ and $y = 2$ and therefore the given equation does not represent $y$ as a function of $x$.
c)
Solve the given equation for $y$ to obtain: $y = \dfrac{1}{x}$. The given equation represents $y$ as a function of $x$ because for each value of $x$, we have one value of $y$ only.
d)

Given equation that $x + y^2 = 25$, solve for $x$ to obtain $x = 25 - y^2 =$.
Let $y = 3$, $x = 25 - (3)^2 = 16$.
Let $y = - 3$, $x = 25 - ( - 3)^2 = 16$.
Therefore for one input $x = 16$, we have two outputs $y = - 3$ and $y = 3$ and therefore the given equation does not represent $y$ as a function of $x$.

## Notation of Functions

The equation $y = -2x + 6$ represent $y$ as a function of $x$. A function can be given a name.
The function given by the above equation may be written as: $y = f(x)$ where $f$ is the name of the function and $f(x) = -2x + 6$.
$x$ is the argument or input of the function, and $y = f(x)$ is the value or output of the function. $f(x)$ is also called the image of $x$ by $f$.
$f(x)$ is read as " $f$ of $x$ ".

Function $f$ takes values at values of $x$. For example $f(2)$ is the value of the function at $x = 2$ and is calculated by substituting $x$ by $2$ in the definition of $f(x)$.
Hence, $f( \color{red}2) = -2 \color{red}{(2)} + 6 = - 4 + 6 = 2$

## Questions

### Part A

Find the range of the given function below given its domain $D$.
$y = x^2 - 1$ , $D = \{-1 , 3 , 5 \}$

### Part B

Which of the following equations represents or does not represent $y$ as a function of $x$? Explain why.
a) $-3 x + y = x + 3$
b) $| x | + 5 = y$
c) $\dfrac{y - 2}{x} = - 3$
d) $x + | y | = 25$

### Part C

Find the domain of the functions.
a)   $- y = x + 2$
b)   $3x = y + 4$
c)   $y = \dfrac{1}{x - 2}$
d)   $y = \dfrac{1}{\sqrt x}$

### Part D

Evaluate, if possible, the following.
$f(0) \; , \; f(-2) \; , \; f(10) \; , \; g(-4)$ and $\; g(-3)$ given that   $f(x) = -6 x + 10$   and   $g(x) = \dfrac{1}{x+3}$.

## Solutions to the Above Questions

### Part A

a)
Substitute the value of $x$ to find the corresponding value of $y$.
For $x = \color{red}{- 1}$ , $\quad y = x^2 - 1 = \color{red}{(-1)}^2 - 1 = 1 - 1 = 0$
For $x = \color{red}{3}$ , $\quad y = x^2 - 1 = \color{red}{(3)}^2 - 1 = 9 - 1 = 8$
For $x = \color{red}{5}$ , $\quad y = x^2 - 1 = \color{red}{(5)}^2 - 1 = 25 - 1 = 24$
Range: $\quad R = \{ 0 , 8 , 24 \}$

### Part B

a)
Solve the given equation for $y$ and group like terms to obtain: $\quad y = 4 x + 3$
For each value of the independent variable $x$, there is one value only of the dependent variable $y$ and hence the given equation represents $y$ as a function of $x$.
b)
The given equation may be written as: $\quad y = | x | + 5$
For each value of the variable $x$, there is one value only of the dependent variable $y$ and hence the given equation represents $y$ as a function of $x$.
c)
Multiply both side of the given equation by $x$ to obtain: $\quad x \dfrac{y - 2}{x} = - 3 x$
Simplify the above: $\quad y - 2 = - 3x$
Solve for $y$: $\quad y = - 3 x + 2$
For each value of the variable $x$, there is one value only of the dependent variable $y$ and hence the given equation represents $y$ as a function of $x$.
d)
Rewrite the given equation as: $| y | = 25 - x$
Substitute $x$ by any real value in the above equation. For $x = 4$, for example, the above equation is written as. $\quad | y | = 25 - 4 = 21$
Solve the equation $| y | = 21$ to obtain two solutions: $y = 21$ and $y = -21$
Hence for the input $x = 4$, we have two values of the output $y$ and therefore the given equation does not represent $y$ as a function of $x$.

### Part C

a)
Solve the given equation for $y$: $\quad y = - x - 2$
The independent variable $x$ in the above function may take any value if the set of the real numbers. Hence the domain is the set of all real numbers.
b)
Solve the given equation for $y$: $\quad y = 3 x - 4$
The independent variable $x$ in the above function may take any value if the set of the real numbers. Hence the domain is the set of all real numbers.
c)
In the given function $y = \dfrac{1}{x - 2}$, there is a division and a division by zero in not allowed in mathematics. The denominator of the expression $\dfrac{1}{x - 2}$ is $x - 2$ which is equal to zero for $x = 2$. Hence the domain is the set of all real numbers except $x = 2$.
d)
In the given function $y = \dfrac{1}{\sqrt x}$, there is square root and a division. The square root is defined as a real number for $x$ non negative. The division is not allowed for $\sqrt x = 0$ or $x = 0$. Therefore the domain of the given function is the set of all positive real numbers.

### Part D

Calculate by substitution.
$f (\color{red}{0}) = -6 \color{red}{(0)} + 10 = 0 + 10 = 10$
$f (\color{red}{-2}) = -6 \color{red}{(-2)} + 10 = 12 + 10 = 22$
$f (\color{red}{10}) = -6 \color{red}{(10)} + 10 = -60 + 10 =-50$
$g (\color{red}{-4}) = \dfrac{1}{(-4)+3} = \dfrac{1}{-1} = -1$
$g (\color{red}{-3}) = \dfrac{1}{(-3)+3} = \dfrac{1}{0} = \text{undefined}$