# Calculus/Functions

Functions are everywhere, from a simple correlation between distance and time to complex heat waves. This chapter focuses on the fundamentals of functions: the definition, basic concepts, and other defining aspects. It is very concept-heavy, and expect a lot of reading and understanding. However, this is simply a review and an introduction on what is to come in future chapters.

## Introduction

An easy but vague way to understand functions is, to remember that a function i is like a processor. It takes the input to change the output. Formally, a function f from a set X to a set Y is defined by a set G of ordered pairs (x, y) such that x ∈ X, y ∈ Y, and every element of X is the first component of exactly one ordered pair in G. In other words, for every x in X, there is exactly one element y such that the ordered pair (x, y) belongs to the set of pairs defining the function f. The set G is called the graph of the function. Formally speaking, it may be identified with the function, but this hides the usual interpretation of a function as a process. Therefore, in common usage, the function is generally distinguished from its graph.
Whenever one quantity uniquely determines the value of another quantity, we have a function. That is, the set $X$ uniquely determines the set $Y$. You can think of a function as a kind of machine. You feed the machine raw materials, and the machine changes the raw materials into a finished product.
* A function in everyday life
* Think about dropping a ball from a bridge. At each moment in time, the ball is a height above the ground. The height of the ball is a function of time. It was the job of physicists to come up with a formula for this function. This type of function is called real-valued since the "finished product" is a number (or, more specifically, a real number).
* A function in everyday life (Preview of Multivariable Calculus)
* Think about a wind storm. At different places, the wind can be blowing in different directions with different intensities. The direction and intensity of the wind can be thought of as a function of position. This is a function of two real variables (a location is described by two values - an $x$ and a $y$) which results in a vector (which is something that can be used to hold a direction and an intensity). These functions are studied in multivariable calculus (which is usually studied after a one year college level calculus course). This a vector-valued function of two real variables.
We will be looking at real-valued functions until studying multivariable calculus. Think of a real-valued function as an input-output machine; you give the function an input, and it gives you an output which is a number (more specifically, a real number). For example, the squaring function takes the input 4 and gives the output value 16. The same squaring function takes the input -1 and gives the output value 1.

### Notation

Functions are used so much that there is a special notation for them. The notation is somewhat ambiguous, so familiarity with it is important in order to understand the intention of an equation or formula.
Though there are no strict rules for naming a function, it is standard practice to use the letters $f$ , $g$ , and $h$ to denote functions, and the variable $x$ to denote an independent variable. $y$ is used for both dependent and independent variables.
When discussing or working with a function $f$ , it's important to know not only the function, but also its independent variable $x$ . Thus, when referring to a function $f$, you usually do not write $f$, but instead $f(x)$ . The function is now referred to as "$f$ of $x$". The name of the function is adjacent to the independent variable (in parentheses). This is useful for indicating the value of the function at a particular value of the independent variable. For instance, if
    $f(x)=7x+1$ ,
and if we want to use the value of $f$ for $x$ equal to $2$ , then we would substitute 2 for $x$ on both sides of the definition above and write
    $f(2)=7(2)+1=14+1=15$
This notation is more informative than leaving off the independent variable and writing simply '$f$' , but can be ambiguous since the parentheses next to $f$ can be misinterpreted as multiplication, $2f$. To make sure nobody is too confused, follow this procedure:
* Define the function $f$ by equating it to some expression.
* Give a sentence like the following: "At $x=c$, the function $f$ is..."
* Evaluate the function.

### Description

There are many ways which people describe functions. In the examples above, a verbal description is given (the height of the ball above the earth as a function of time). Here is a list of ways to describe functions. The top three listed approaches to describing functions are the most popular.
* A function is given a name (such as $f$) and a formula for the function is also given. For example, $f(x)=3x+2$ describes a function. We refer to the input as the argument of the function (or the independent variable), and to the output as the value of the function at the given argument.
* A function is described using an equation and two variables. One variable is for the input of the function and one is for the output of the function. The variable for the input is called the independent variable. The variable for the output is called the dependent variable. For example, $y=3x+2$ describes a function. The dependent variable appears by itself on the left hand side of equal sign.
* A verbal description of the function.
When a function is given a name (like in number 1 above), the name of the function is usually a single letter of the alphabet (such as $f$ or $g$). Some functions whose names are multiple letters (like the sine function $y=\sin(x)$)
* Plugging a value into a function
* If we write $f(x)=3x+2$ , then we know that
* The function $f$ is a function of $x$ .
* To evaluate the function at a certain number, replace the $x$ with that number.
* Replacing $x$ with that number in the right side of the function will produce the function's output for that certain input.
* In English, the definition of $f$ is interpreted, "Given a number, $f$ will return two more than the triple of that number."
* How would we know the value of the function $f$ at 3?
* We would have the following three thoughts:
* $f(3)=3(3)+2$
* $3(3)+2=9+2$
* $9+2=11$
* and we would write
* $f(3)=3(3)+2=9+2=11$.
* The value of $f$ at 3 is 11.
* Note that $f(3)$ means the value of the dependent variable when $x$ takes on the value of 3. So we see that the number 11 is the output of the function when we give the number 3 as the input. People often summarize the work above by writing "the value of $f$ at three is eleven", or simply "$f$ of three equals eleven".

## Basic concepts of functions

The formal definition of a function states that a function is actually a mapping that associates the elements of one set called the domain of the function, $A$, with the elements of another set called the range of the function, $B$. For each value we select from the domain of the function, there exists exactly one corresponding element in the range of the function. The definition of the function tells us which element in the range corresponds to the element we picked from the domain. An example of how is given below.
* Let function $f(x)=5x+{\frac {5x}{2}}$ for all $x$. For what value of $x$ gives $f(x)=225{\frac {1}{2}}$?
* In mathematics, it is important to notice any repetition. If something seems to repeat, keep a note of that in the back of your mind somewhere.
* Here, notice that $f(x)=5x+{\frac {5x}{2}}$ and $f(x)=225{\frac {1}{2}}$. Because $f(x)$ is equal to two different things, it must be the case that the other side of the equal sign to $f(x)$ is equal to the other. This property is known as the transitive property and could thus make the following equation below true:
* $225{\frac {1}{2}}=5x+{\frac {5x}{2}}$
* Next, simplify — make your life easier rather than harder. In this instance, since $5x+{\frac {5x}{2}}$ has $x$ as a like-term, and the two terms are fractions added to the other, put it over a common denominator and simplify. Similar, since $225{\frac {1}{2}}$ is a mixed fraction, $225{\frac {1}{2}}=225+{\frac {1}{2}}$.
* $225{\frac {1}{2}}=5x+{\frac {5x}{2}}$
* $\Rightarrow {\frac {225}{1}}+{\frac {1}{2}}={\frac {5x}{1}}+{\frac {5x}{2}}$
* $\Rightarrow {\frac {450}{2}}+{\frac {1}{2}}={\frac {10x}{2}}+{\frac {5x}{2}}$
* $\Rightarrow {\frac {451}{2}}={\frac {15x}{2}}$
* Multiply both sides by the reciprocal of the coefficient of $x$, ${\frac {2}{15}}$ from both sides by multiplying by it.
* ${\frac {2}{15}}\cdot {\frac {451}{2}}=x$
* ${\frac {451}{15}}=x$ or $x={\frac {451}{15}}$.
* The value of $x$ that makes $f(x)=225{\frac {1}{2}}$ is $x={\frac {451}{15}}$.$\blacksquare$.
Classically, the element picked from the domain is pictured as something that is fed into the function and the corresponding element in the range is pictured as the output. Since we "pick" the element in the domain whose corresponding element in the range we want to find, we have control over what element we pick and hence this element is also known as the "independent variable". The element mapped in the range is beyond our control and is "mapped to" by the function. This element is hence also known as the "dependent variable", for it depends on which independent variable we pick. Since the elementary idea of functions is better understood from the classical viewpoint, we shall use it hereafter. However, it is still important to remember the correct definition of functions at all times.

### Basic types of transformation

To make it simple, for the function $f(x)$, all of the possible $x$ values constitute the domain, and all of the values $f(x)$ ($y$ on the x-y plane) constitute the range. To put it in more formal terms, a function $f$ is a mapping of some element $a\in A$, called the domain, to exactly one element $b\in B$, called the range, such that $f:A\to B$. The image below should help explain the modern definition of a function:
* A function is considered one-to-one if an element $a\in A$ from domain $A$ of function $f$, leads to exactly one element $b\in B$ from range $B$ of the function. By definition, since only one element $b$ is mapped by function $f$ from some element $a$, $f:A\to B$ implies that there exists only one element $b$ from the mapping. Therefore, there exists a one-to-one function because it complies with the definition of a function. This definition is similar to Figure 1.
* A function is considered many-to-one if some elements $a_{1},a_{2},\ldots a_{n}\in A$ from domain $A$ of function $f$ maps to exactly one element $b\in B$ from range $B$ of the function. Since some elements $\left(a_{1},a_{2},\ldots a_{n}\right)\in A$ must map onto exactly one element $b\in B$, $f:A\to B$ must be compliant with the definition of a function. Therefore, there exists a many-to-one function.
* A function is considered one-to-many if exactly one element $a\in A$ from domain $A$ of function $f$ maps to some elements $\left(b_{1},b_{2},\ldots b_{n}\right)\in B$ from range $B$ of the function. If some element $a$ maps onto many distinct elements $b$, then $f:A\to B$ is non-functional since there exists many distinct elements $b$. Given many-to-one is non-compliant to the definition of a function, there exists no function that is one-to-many.
The modern definition describes a function sufficiently such that it helps us determine whether some new type of "function" is indeed one. Now that each case is defined above, you can now prove whether functions are one of these function cases. Here is an example problem:
* Given: $f(x)=ax+b$, where $a$ and $b$ are constant and $a\neq 0$.
* Prove: function $f$ is one-to-one. Notice that the only changing element in the function $f$ is $x$. To prove a function is one-to-one by applying the definition may be impossible because although two random elements of domain set $A$ may not be many-to-one, there may be some elements $\left(a_{1},a_{2},\ldots a_{n}\right)\in A$ that may make the function many-to-one. To account for this possibility, we must prove that it is impossible to have some result like that.
* Assume there exists two distinct elements $x_{1}\neq x_{2}$ that will result in $f\left(x_{1}\right)=f\left(x_{2}\right)$. This would make the function many-to-one. In consequence,
* $ax_{1}+b=ax_{2}+b$
* Subtract $b$ from both sides of the equation.
* $\Rightarrow ax_{1}=ax_{2}$
* Subtract $ax_{2}$ from both sides of the equation.
* $\Rightarrow ax_{1}-ax_{2}=0$
* Factor $a$ from both terms to the left of the equation.
* $\Rightarrow a\left(x_{1}-x_{2}\right)=0$
* Multiply ${\frac {1}{a}}$ to both sides of the equation.
* $\Rightarrow \left(x_{1}-x_{2}\right)=0$
* Add $x_{2}$ to both sides of the equation.
* $\Rightarrow x_{1}=x_{2}$
* Notice that $x_{1}=x_{2}$. However, this is impossible because $x_{1}$ and $x_{2}$ are distinct. Ergo, $f\left(x_{1}\right)\neq f\left(x_{2}\right)$. No two distinct inputs can give the same output. Therefore, the function must be one-to-one.

### Basic concepts

There are a few more important ideas to learn from the modern definition of the function, and it comes from knowing the difference between domain, range, and codomain. We already discussed some of these, yet knowing about sets adds a new definition for each of the following ideas. Therefore, let us discuss these based on these new ideas. Let $A$ and $B$ be a set. If we were to combine these two sets, it would be defined as the cartesian cross product $A\times B$. The subset of this product is the function. The below definitions are a little confusing. The best way to interpret these is to draw an image. To the right of these definitions is the image that corresponds to it.
The domain is defined to be a set $A$ with all elements $a\in A$ mapping to at least one unique $b\in B$ .
The set of elements in $B$ is the range of the function mapping $f:A\to B$ in the cartesian cross product, whereby the set of all elements $a\in A$ maps to some element $b\in B$ .
The codomain is the set $B$, where it is not necessarily the case that all elements $b\in B$ was mapped by some $a\in A$ .
Note that the codomain is not as important as the other two concepts.
Take $f(x)={\sqrt {1-x^{2}}}$ for example:
Because of the square root, the content in the square root should be strictly not smaller than 0.
   $1-x^{2}\geq 0$
   $\Leftrightarrow -1\leq x\leq 1$
Thus the domain is
   $x\in [-1,1]$
Correspondingly, the range will be
   $f(x)\in [0,1]$

### Other types of transformation

There is one more final aspect that needs to be defined. We already have a good idea of what makes a mapping a function (e.g. it cannot be one-to-many). However, three more definitions that you will often hear will be necessary to talk about: injective, surjective, bijective.
* A function is injective if it is one-to-one.
* A function is surjective if it is "onto." That is, the mapping $f:A\to B$ has $B$ as the range of the function, where the codomain and the range of the function are the same.
* A function is bijective if it is both surjective and injective.
Again, the above definitions are often very confusing. Again, another image is provided to the right of the bullet points. Along with that, another example is also provided. Let us analyze the function $g(x)=ax^{2}$.
* Given: $g(x)=ax^{2}$, where $a$ is constant and $a\neq 0$.
* Prove: function $g$ is non-surjective and non-injective. Notice that the only changing element in the function $g$ is $x$. Let us check to see the conditions of this function.
* Is it injective? Let $g(x)=y$, and solve for $x$. First, divide by $a$.
* $y=ax^{2}$
* $\Rightarrow {\frac {y}{a}}=x^{2}$
* Then take the square root of $x^{2}$. By definition, ${\sqrt {x^{2}}}=\pm {\sqrt {x^{2}}}=\pm x$, so
* ${\frac {y}{a}}=x^{2}$
* $\Rightarrow \pm {\sqrt {\frac {y}{a}}}=\pm x$
* Notice, however, what we learned from the above manipulation. As a result of solving for $x$, we found that there are two solutions for $x$. However, this resulted in two different values from ${\frac {y}{a}}$. This means that for some individual $x$ that gives $y$, there are two different inputs that result in the same value. Because $f(x_{1})=f(x_{2})$ when $x_{1}\neq x_{2}$, this is by definition non-injective.
* Is it surjective? As a natural consequence of what we learned about inputs, let us determine the range of the function. After all, the only way to determine if something is surjective is to see if the range applies to all real numbers. A good way to determine this is by finding a pattern involving our domains. Let us say we input a negative number for the domain: $f(-x)=a(-x)^{2}=a\cdot (-x)\cdot (-x)=ax^{2}$. This seemingly trivial exercise tells us that negative numbers give us non-negative numbers for our range. This is huge information! For $x\in \mathbb {R}$, the function always results $y>0$ for our range. For the set $B$, we have elements in that set that have no mappings from the set $A$. As such, $y\leq 0$ is the codomain of set $B$. Therefore, this function is non-surjective!

### Tests for equations
#### The vertical line test

The vertical line test is a systematic test to find out if an equation involving $x$ and $y$ can serve as a function (with $x$ the independent variable and $y$ the dependent variable). Simply graph the equation and draw a vertical line through each point of the $x$-axis. If any vertical line ever touches the graph at more than one point, then the equation is not a function; if the line always touches at most one point of the graph, then the equation is a function.
The circle, on the right, is not a function because the vertical line intercepts two points on the graph when $x=1$.

#### The horizontal line and the algebraic 1-1 test

Similarly, the horizontal line test, though does not test if an equation is a function, tests if a function is injective (one-to-one). If any horizontal line ever touches the graph at more than one point, then the function is not one-to-one; if the line always touches at most one point on the graph, then the function is one-to-one.
The algebraic 1-1 test is the non-geometric way to see if a function is one-to-one. The basic concept is that:
Assume there is a function $f$. If:
   $f(a)=f(b)$, and $a=b$, then
function $f$ is one-to-one.
Here is an example: prove that $f(x)={\frac {1-2x}{1+x}}$ is injective.
Since the notation is the notation for a function, the equation is a function. So we only need to prove that it is injective. Let $a$ and $b$ be the inputs of the function and that $f(a)=f(b)$. Thus,
    ${\frac {1-2a}{1+a}}={\frac {1-2b}{1+b}}$
    $\Leftrightarrow (1+b)(1-2a)=(1+a)(1-2b)$
    $\Leftrightarrow 1-2a+b-2ab=1-2b+a-2ab$ $\Leftrightarrow 1-2a+b=1-2b+a$
    $\Leftrightarrow 1-2a+3b=1+a$
    $\Leftrightarrow 1+3b=1+3a$
    $\Leftrightarrow a=b$
So, the result is $a=b$, proving that the function is injective.
Another example is proving that $g(x)=x^{2}$ is not injective.
Using the same method, one can find that $a=\pm b$, which is not $a=b$. So, the function is not injective.

### Remarks

The following arise as a direct consequence of the definition of functions:
* By definition, for each "input" a function returns only one "output", corresponding to that input. While the same output may correspond to more than one input, one input cannot correspond to more than one output. This is expressed graphically as the vertical line test: a line drawn parallel to the axis of the dependent variable (normally vertical) will intersect the graph of a function only once. However, a line drawn parallel to the axis of the independent variable (normally horizontal) may intersect the graph of a function as many times as it likes. Equivalently, this has an algebraic (or formula-based) interpretation. We can always say if $a=b$ , then $f(a)=f(b)$ , but if we only know that $f(a)=f(b)$ then we can't be sure that $a=b$ .
* Each function has a set of values, the function's domain, which it can accept as input. Perhaps this set is all positive real numbers; perhaps it is the set {pork, mutton, beef}. This set must be implicitly/explicitly defined in the definition of the function. You cannot feed the function an element that isn't in the domain, as the function is not defined for that input element.
* Each function has a set of values, the function's range, which it can output. This may be the set of real numbers. It may be the set of positive integers or even the set {0,1}. This set, too, must be implicitly/explicitly defined in the definition of the function.
Functions are an important foundation of mathematics. This modern interpretation is a result of the hard work of the mathematicians of history. It was not until recently that the definition of the relation was introduced by René Descartes in Geometry (1637). Nearly a century later, the standard notation ($f(x)=y$) was first introduced by Leonhard Euler in Introductio in Analysin Infinitorum and Institutiones Calculi Differentialis. The term function was also a new innovation during Euler's time as well, being introduced Gottfried Wilhelm Leibniz in a 1673 letter "to describe a quantity related to points of a curve, such as a coordinate or curve's slope." Finally, the modern definition of the function being the relation among sets was first introduced in 1908 by Godfrey Harold Hardy where there is a relation between two variables $x$ and $y$ such that "to some values of $x$ at any rate correspond values of $y$." For the person that wants to learn more about the history of the function, go to History of functions.

## Important functions

The functions listed below are essential to calculus. This section only serves as a review and scratches the surface of those functions. If there are any questions about those functions, please review the materials related to those functions before continuing. More about graphing will be explained in Chapter 1.4

### Polynomials

Polynomial functions are the most common and most convenient functions in the world of calculus. Their frequent appearances and their applications on computer calculations have made them important.
A polynomial in a single indeterminate x can always be written (or rewritten) in the form:
    $f(x)=a_{n}x^{n}+a_{n-1}x^{n-1}+a_{n-2}x^{n-2}+\cdot \cdot \cdot +a_{2}x^{2}+a_{1}x+a_{0}$
To be more concise, it can also be written in the summation form:
    $\sum _{k=0}^{n}a_{k}x^{k}$

#### Constant

When $n=0$, the polynomial can be rewritten into the following function:
   $f(x)=C$, where $C$ is a constant.
The graph of this function is a horizontal line passing the point $(0,C)$.

#### Linear

When $n=1$, the polynomial can be rewritten into
   $f(x)=mx+b$, where $m{\text{ and }}b$ are constants.
The graph of this function is a straight line passing the point $(0,b)$ and $(-{\frac {b}{m}},0)$, and the slope of this function is $m$.

#### Quadratic

When $n=2$, the polynomial can be rewritten into
   $f(x)=ax^{2}+bx+c$, where $a,b,c$ are constants.
The graph of this function is a parabola, like the trajectory of a basketball thrown into the hoop.
If there are questions about the quadratic formula and other basic polynomial concepts, please review the respective chapters in Algebra.

### Trigonometric

Trigonometric functions are also very important because it can connect algebra and geometry. Trigonometric functions are explained in detail here due to its importance and difficulty.

### Exponential and Logarithmic

Exponential and logarithmic functions have a unique identity when calculating the derivatives, so this is a great time to review those functions.
The exponential function is defined as:
    $f(x)=a^{x}$, where $a$ is a constant.
while the logarithmic function is defined as:
    $f(x)=\log _{b}x$, where $b$ is a constant.
A special number will be frequently seen in those functions: the Euler's constant, also known as the base of the natural logarithm. Notated as $e$, it is defined as $e=\sum _{n=0}^{\infty }{\frac {1}{n!}}$.

### Signum

The Signum (sign) function is simply defined as
   ${\mbox{sgn}}(x)=\left\{{\begin{matrix}-1&{\text{if}}&x<0\\0&{\text{if}}&x=0\\1&{\text{if}}&x>0\end{matrix}}\right.$

## Properties of functions

Sometimes, a lot of function manipulations cannot be achieved without some help from basic properties of functions.

### Domain and range

This concept is discussed above.

### Growth

Although it seems obvious to spot a function increasing or decreasing, without the help of graphing software, we need a mathematical way to spot whether the function is increasing or decreasing, or else our human minds cannot immediately comprehend the huge amount of information.
Assume a function $f(x)$ with inputs $x_{1},x_{2}$, and that $x_{1}\in [a,b]$, $x_{2}\in [a,b]$, and $x_{2}>x_{1}$ at all times.
   If for all $x_{1}$ and $x_{2}$, $f(x_{2})-f(x_{1})>0$, then
   $f(x)$ is increasing in $[a,b]$
   If for all $x_{1}$ and $x_{2}$, $f(x_{2})-f(x_{1})<0$, then
   $f(x)$ is decreasing in $[a,b]$
Example: In which intervals is $f(x)={\frac {1}{1-x^{2}}}$ increasing?
Firstly, the domain is important. Because the denominator cannot be 0, the domain for this function is
$x\in (-\infty ,-1)\cup (-1,1)\cup (1,\infty )$
In $(-\infty ,-1)$, the growth of the function is:
   Let $x_{1},x_{2}\in [-\infty ,-1]$ and $x_{2}>x_{1}$
   Thus,
      $f(x_{2})-f(x_{1})={\frac {1}{1-x_{2}^{2}}}-{\frac {1}{1-x_{1}^{2}}}={\frac {x_{2}^{2}-x_{1}^{2}}{(1-x_{2}^{2})(1-x_{1}^{2})}}$
   $\because$ both $x_{1},x_{2}\in [-\infty ,-1]$
   $\therefore$ $(1-x_{2}^{2})(1-x_{1}^{2})>0$
   $\because$ $x_{2}>x_{1}$ and $x_{1}<x_{2}<0$
   $\therefore$ $x_{2}^{2}-x_{1}^{2}<0$
      $f(x_{2})-f(x_{1})={\frac {x_{2}^{2}-x_{1}^{2}}{(1-x_{2}^{2})(1-x_{1}^{2})}}<0$
   $f(x)$ is decreasing in $(-\infty ,-1)$
In $(-1,1)$
   Let $x_{1},x_{2}\in [-1,1]$ and $x_{2}>x_{1}$
   Thus,
      $f(x_{2})-f(x_{1})={\frac {1}{1-x_{2}^{2}}}-{\frac {1}{1-x_{1}^{2}}}={\frac {x_{2}^{2}-x_{1}^{2}}{(1-x_{2}^{2})(1-x_{1}^{2})}}$
   $\because$ both $x_{1},x_{2}\in [-\infty ,-1]$
   $\therefore$$(1-x_{2}^{2})(1-x_{1}^{2})>0$
   However, the sign of $x_{2}^{2}-x_{1}^{2}$ in $(-1,1)$ cannot be determined. It can only be determined in $(-1,0){\text{ and }}(0,1)$.
      $(-1,0)$
      $\because$ $x_{2}>x_{1}$ and $x_{1}<x_{2}<0$
      $\therefore$ $x_{2}^{2}-x_{1}^{2}<0$
      In $(0,1)$
      $\because x_{2}>x_{1}{\text{ and }}0<x_{1}<x_{2}$
      $\therefore x_{2}^{2}-x_{1}^{2}>0$
   As a result,
   $f(x)$ is decreasing in $(-1,0)$ and increasing in $(0,1)$.
In $(1,\infty )$
   Let $x_{1},x_{2}\in [1,\infty ]$ and $x_{2}>x_{1}$
   Thus,
      $f(x_{2})-f(x_{1})={\frac {1}{1-x_{2}^{2}}}-{\frac {1}{1-x_{1}^{2}}}={\frac {x_{2}^{2}-x_{1}^{2}}{(1-x_{2}^{2})(1-x_{1}^{2})}}$
   $\because$ both $x_{1},x_{2}\in [-\infty ,-1]$
   $\therefore$$(1-x_{2}^{2})(1-x_{1}^{2})>0$
   $\because x_{2}>x_{1}{\text{ and }}0<x_{1}<x_{2}$
   $\therefore x_{2}^{2}-x_{1}^{2}>0$
      $f(x_{2})-f(x_{1})={\frac {x_{2}^{2}-x_{1}^{2}}{(1-x_{2}^{2})(1-x_{1}^{2})}}>0$
   $f(x)$ is increasing in $(1,\infty )$.
Therefore, the intervals in which the function is increasing are $(0,1)\And (1,\infty )$.
$\blacksquare$
After learning derivatives, there will be more ways to determine the growth of a function.

### Parity

The properties odd and even are associated with symmetry. While even functions have a symmetry about the $y$-axis, odd functions are symmetric about the origin. In mathematical terms:
   A function is even when $f(-x)=f(x)$
   A function is odd when $f(-x)=-f(x)$
Example: Prove that $f(x)={\frac {1}{1-x^{2}}}$ is an even function.
$\because f(-x)={\frac {1}{1-(-x)^{2}}}={\frac {1}{1-x^{2}}}=f(x)$
$\therefore f(x)$ is an even function
$\blacksquare$

## Manipulating functions
### Addition, Subtraction, Multiplication and Division of functions

For two real-valued functions, we can add the functions, multiply the functions, raised to a power, etc.
* Example: Adding, subtracting, multiplying and dividing functions which do not have a name
* If we add the functions $y=3x+2$ and $y=x^{2}$ , we obtain $y=x^{2}+3x+2$ .
* If we subtract $y=3x+2$ from $y=x^{2}$ , we obtain $y=x^{2}-(3x+2)$ . We can also write this as $y=x^{2}-3x-2$ .
* If we multiply the function $y=3x+2$ and the function $y=x^{2}$ , we obtain $y=(3x+2)x^{2}$ . We can also write this as $y=3x^{3}+2x^{2}$ .
* If we divide the function $y=3x+2$ by the function $y=x^{2}$ , we obtain $y={\frac {3x+2}{x^{2}}}$ .
If a math problem wants you to add two functions $f$ and $g$ , there are two ways that the problem will likely be worded:
* If you are told that $f(x)=3x+2$ , that $g(x)=x^{2}$ , that $h(x)=f(x)+g(x)$ and asked about $h$ , then you are being asked to add two functions. Your answer would be $h(x)=x^{2}+3x+2$ .
* If you are told that $f(x)=3x+2$ , that $g(x)=x^{2}$ and you are asked about $f+g$ , then you are being asked to add two functions. The addition of $f$ and $g$ is called $f+g$ . Your answer would be $(f+g)(x)=x^{2}+3x+2$ .
Similar statements can be made for subtraction, multiplication and division.
* Example: Adding, subtracting, multiplying and dividing functions which do have a name
* Let $f(x)=3x+2$ and: $g(x)=x^{2}$ . Let's add, subtract, multiply and divide.
* ${\begin{aligned}(f+g)(x)&=f(x)+g(x)\\&=(3x+2)+(x^{2})\\&=x^{2}+3x+2\,\end{aligned}}$ ,
* ${\begin{aligned}(f-g)(x)&=f(x)-g(x)\\&=(3x+2)-(x^{2})\\&=-x^{2}+3x+2\,\end{aligned}}$ ,
* ${\begin{aligned}(f\times g)(x)&=f(x)\times g(x)\\&=(3x+2)\times (x^{2})\\&=3x^{3}+2x^{2}\,\end{aligned}}$ ,
* ${\begin{aligned}\left({\frac {f}{g}}\right)(x)&={\frac {f(x)}{g(x)}}\\&={\frac {3x+2}{x^{2}}}\\&={\frac {3}{x}}+{\frac {2}{x^{2}}}\end{aligned}}$ .

### Composition of functions

We begin with a fun (and not too complicated) application of composition of functions before we talk about what composition of functions is.
* Example: Dropping a ball
* If we drop a ball from a bridge which is 20 meters above the ground, then the height of our ball above the earth is a function of time. The physicists tell us that if we measure time in seconds and distance in meters, then the formula for height in terms of time is $h=-4.9t^{2}+20$ . Suppose we are tracking the ball with a camera and always want the ball to be in the center of our picture. Suppose we have $\theta =f(h)$ The angle will depend upon the height of the ball above the ground and the height above the ground depends upon time. So the angle will depend upon time. This can be written as $\theta =f(-4.9t^{2}+20)$ . We replace $h$ with what it is equal to. This is the essence of composition.
Composition of functions is another way to combine functions which is different from addition, subtraction, multiplication or division.
The value of a function $f$ depends upon the value of another variable $x$ ; however, that variable could be equal to another function $g$ , so its value depends on the value of a third variable. If this is the case, then the first variable is a function $h$ of the third variable; this function ($h$) is called the composition of the other two functions ($f$ and $g$).
* Example: Composing two functions
* Let $f(x)=3x+2$ and: $g(x)=x^{2}$ . The composition of $f$ with $g$ is read as either "f composed with g" or "f of g of x."
* Let
* $h(x)=f(g(x))$
* Then
* ${\begin{aligned}h(x)&=f(g(x))\\&=f(x^{2})\\&=3(x^{2})+2\\&=3x^{2}+2\,\end{aligned}}$ .
* Sometimes a math problem asks you compute $(f\circ g)(x)$
* when they want you to compute $f(g(x))$ ,
* Here, $h$ is the composition of $f$ and $g$ and we write $h=f\circ g$ . Note that composition is not commutative:
* $f(g(x))=3x^{2}+2$ , and
* ${\begin{aligned}g(f(x))&=g(3x+2)\\&=(3x+2)^{2}\\&=9x^{2}+12x+4\,.\end{aligned}}$
* so $f(g(x))\neq g(f(x))$ .
Composition of functions is very common, mainly because functions themselves are common. For instance, squaring and sine are both functions:
    ${\mbox{square}}(x)=x^{2}$
    ${\mbox{sine}}(x)=\sin(x)$
Thus, the expression $\sin ^{2}(x)$ is a composition of functions:
    $\sin ^{2}(x)$ $={\mbox{square}}(\sin(x))$ $={\mbox{square}}({\mbox{sine}}(x))$
(Note that this is not the same as ${\mbox{sine}}({\mbox{square}}(x))=\sin(x^{2})$ .) Since the function sine equals ${\tfrac {1}{2}}$ if $x={\frac {\pi }{6}}$ ,
    ${\mbox{square}}\left(\sin \left({\tfrac {\pi }{6}}\right)\right)={\mbox{square}}\left({\tfrac {1}{2}}\right)$ .
Since the function square equals ${\frac {1}{4}}$ if $x={\frac {\pi }{6}}$ ,
    $\sin ^{2}\left({\tfrac {\pi }{6}}\right)={\mbox{square}}\left(\sin \left({\tfrac {\pi }{6}}\right)\right)={\mbox{square}}\left({\tfrac {1}{2}}\right)={\frac {1}{4}}$ .

### Transformations

Transformations are a type of function manipulation that are very common. They consist of multiplying, dividing, adding or subtracting constants to either the input or the output. Multiplying by a constant is called dilation and adding a constant is called translation. Here are a few examples:
    $f(2\times x)$ Dilation
    $f(x+2)$ Translation
    $2\times f(x)$ Dilation
    $2+f(x)$ Translation
Translations and dilations can be either horizontal or vertical. Examples of both vertical and horizontal translations can be seen at right. The red graphs represent functions in their 'original' state, the solid blue graphs have been translated (shifted) horizontally, and the dashed graphs have been translated vertically.
Dilations are demonstrated in a similar fashion. The function
    $f(2\times x)$
has had its input doubled. One way to think about this is that now any change in the input will be doubled. If I add one to $x$, I add two to the input of $f$, so it will now change twice as quickly. Thus, this is a horizontal dilation by ${\frac {1}{2}}$ because the distance to the $y$-axis has been halved. A vertical dilation, such as
    $2\times f(x)$
is slightly more straightforward. In this case, you double the output of the function. The output represents the distance from the $x$-axis, so in effect, you have made the graph of the function 'taller'. Here are a few basic examples where $a$ is any positive constant:
| Original graph | $f(x)$ | Rotation about origin | $-f(-x)$ |
| Horizontal translation by $a$ units left | $f(x+a)$ | Horizontal translation by $a$ units right | $f(x-a)$ |
| Horizontal dilation by a factor of $a$ | $f\left(x\times {\tfrac {1}{a}}\right)$ | Vertical dilation by a factor of $a$ | $a\times f(x)$ |
| Vertical translation by $a$ units down | $f(x)-a$ | Vertical translation by $a$ units up | $f(x)+a$ |
| Reflection about $x$-axis | $-f(x)$ | Reflection about $y$-axis | $f(-x)$ |

## Inverse functions

We call $g(x)$ the inverse function of $f(x)$ if, for all $x$ :
    $g(f(x))=f(g(x))=x$
A function $f(x)$ has an inverse function if and only if $f(x)$ is one-to-one. For example, the inverse of $f(x)=x+2$ is $g(x)=x-2$ . The function $f(x)={\sqrt {1-x^{2}}}$ has no inverse because it is not injective. Similarly, the inverse functions of trigonometric functions have to undergo transformations and limitations to be considered as valid functions.

### Notation

The inverse function of $f$ is denoted as $f^{-1}(x)$ . Thus, $f^{-1}(x)$ is defined as the function that follows this rule
    $f(f^{-1}(x))=f^{-1}(f(x))=x$
To determine $f^{-1}(x)$ when given a function $f$ , substitute $f^{-1}(x)$ for $x$ and substitute $x$ for $f(x)$ . Then solve for $f^{-1}(x)$ , provided that it is also a function.
Example: Given $f(x)=2x-7$ , find $f^{-1}(x)$ .
Substitute $f^{-1}(x)$ for $x$ and substitute $x$ for $f(x)$ . Then solve for $f^{-1}(x)$ :
    $f(x)=2x-7$
    $\Leftrightarrow x=2[f^{-1}(x)]-7$
    $\Leftrightarrow x+7=2[f^{-1}(x)]$
    $\Leftrightarrow {\frac {x+7}{2}}=f^{-1}(x)$
To check your work, confirm that $f^{-1}(f(x))=x$ :
   $f^{-1}(f(x))=$$f^{-1}(2x-7)=$${\frac {(2x-7)+7}{2}}={\frac {2x}{2}}=x$
If $f$ isn't one-to-one, then, as we said before, it doesn't have an inverse. Then this method will fail.
Example: Given $f(x)=x^{2}$ , find $f^{-1}(x)$.
Substitute $f^{-1}(x)$ for $x$ and substitute $x$ for $f(x)$ . Then solve for $f^{-1}(x)$ :
    $f(x)=x^{2}$
    $x=(f^{-1}(x))^{2}$
    $f^{-1}(x)=\pm {\sqrt {x}}$
Since there are two possibilities for $f^{-1}(x)$ , it's not a function. Thus $f(x)=x^{2}$ doesn't have an inverse. Of course, we could also have found this out from the graph by applying the Horizontal Line Test. It's useful, though, to have lots of ways to solve a problem, since in a specific case some of them might be very difficult while others might be easy. For example, we might only know an algebraic expression for $f(x)$ but not a graph.

# External links

* Videos on function and their graphs at Khan Academy
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References