## Set Theory, Relations, Functions Preliminaries: Part III

FUNCTIONS:

Functions as a special kind of relation:

Let us first consider an example where set A is a set of men, and B is a set of positive real numbers. Let us say f is a relation from A to B given by : $f = \{ (x,y) : x \in A, y \hspace{0.1in} is \hspace{0.1in} the \hspace{0.1in} weight \hspace{0.1in} of \hspace{0.1in} the \hspace{0.1in} person \hspace{0.1in} x \}$

Hence, f “relates” every man in set A to his weight in set B. That is,

i) Every man has some weight associated with him in set B. (ii) That weight is unique. That is, a person cannot have more than one weight (at a given time, of course) !! 🙂 This, of course, does not mean that two different persons, say P and Q may not have the same weight 100 kg ( the same element of set B). The only thing it means is that any one person, say P will have one and only one weight (100kg) at the time instant of measurement and not more than one weights (which would be crazy) at a time instant it is measured !!

Definition I (a function defined as a relation):

A function f from a set A (called domain) to a set B (called codomain) is a relation that associates or “pairs up” every element of domain A with a unique element of codomain B. (Note that whereas a relation from a set A to a set B is just a subset of the cartesian product $A \times B$).

Some remarks: The above definition is also motivated by an example of a function as a relation. On the other hand, another definition of a function can be motivated as follows:

We know that the boiling point of water depends on the height of water above sea level. We also know that the simple interest on a deposit in a bank depends on the duration of deposit held in the bank. In these and several such examples, one quantity, say y, depends on another quantity “x”.

Symbol: $f: A \longrightarrow B$; if $x \in A, y \in B$, then we also denote: $f: x \longmapsto y$; we also write $y=f(x)$, read as “y is f of x”.

Here, y is called image of x under f and x is called the preimage of y under f.

Definition: Range: The set of all images in B is called the range of f. That is, $Range = \{ f(x): x \in A\}$

Note: (i) Every function is a relation but every relation need not be a function. (Homework quiz: find illustrative examples for the same) (ii) If the domain and codomain are not specified, they are assumed to be the set of real numbers.

In calculus, we often want to refer to a generic function without having any particular formula in mind. Leonhard Euler invented a symbolic way to say “y is a function of x” by writing

$y = f(x)$ (“y equals f of x”)

In this equation, the symbol f represents the function. The letter x, called the independent variable, represents an input value from the domain of f, and y, the dependent variable, represents the corresponding output value f(x) in the range of f. Here is the formal definition of function: (definition 2):

function from a set D to a set $\Re$ is a rule that assigns a unique element f(x) in $\Re$ to each element x in D.

In this definition, D=D(f) (read “D of f”) is the domain of the function f and $\Re$ is the range (or codomain containing the range of f).

Think of a function f as a kind of machine that produces an output value f(x) in its range whenever we feed it an input value x from its domain. In our scope, we will usually define functions in one of two ways:

a) by giving a formula such as $y=x^{2}$ that uses a dependent variable y to denote the value of the function, or

b) by giving a formula such as $f(x)=x^{2}$ that defines a function symbol f to name the function.

NOTE: there can be well-defined functions which do not have any formula at all; for example, let $f(x) = 0$ when $x \in Q$ and $f(x)=1$, when $x \in Q^{'}$.

Strictly speaking, we should call the function f and not f(x) as the latter denotes the value of the function at the point x. However, as is common usage, we will often refer to the function as f(x) in order to name the variable on which f depends.

It is sometimes convenient to use a single letter to denote both a function and the dependent variable. For instance, we might say that the area A of a circle of radius r is given by the function : $A(r)=\pi r^{2}$.

Evaluation:

As we said earlier, most of the functions in our scope will be real-valued function of a real variable, functions whose domains and ranges are sets of real numbers. We evaluate such functions by susbtituting particular values from the domain into the function’s defining rule to calculate the corresponding values in the range.

Example 1:

The volume V of a ball (solid sphere) r is given by the function: $V(r)=\frac{4}{3}\pi r^{3}$.

The volume of a ball of radius 3 meters is : $V(3)=\frac{4}{3}\pi (3)^{3}=36 \pi m^{3}$.

Example 2:

Suppose that the function F is defined for all real numbers t by the formula: $F(t)=2(t-1)+3$.

Evaluate F at the output values 0, 2, $x+2$, and F(2).

Solution 2:

In each case, we substitute the given input value for t into the formula for F:

$F(0)=2(0-1)+3=-2+3=1$

$F(2)=2(2-1)+3=2+3=5$

$F(x+2)=2(x+2-1)+3=2x+3$

$F(F(2))=F(5)=2(5-1)+3=11$

The Domain Convention

When we define a function $y=f(x)$ with a formula and the domain is not stated explicitly, the domain is assumed to be the largest set of x-values for which the formula gives real x-values. This is the function’s so-called natural domain. If we want the domain to be restricted in some way, we must say so.

The domain of the function $y=x^{2}$ is understood to be the entire set of real numbers. The formula gives a real value y-value for every real number x. If we want to restrict the domain to values of x greater than or equal to 2, we must write ” $y=x^{2}$” for $x \geq 2$.

Changing the domain to which we apply a formula usually changes the range as well. The range of $y=x^{2}$ is $[0, \infty)$. The  range of $y=x^{2}$ where $x \geq 2$ is the set of all numbers obtained by squaring numbers greater than or equal to 2. In symbols, the range is $\{ x^{2}: x \geq 2\}$ or $\{ y: y \geq 4\}$ or $[4,\infty)$

Example 3:

Function : $y = \sqrt{1-x^{2}}$; domain $[-1,1]$; Range (y) is $[0,1]$

Function: $y=\frac{1}{x}$; domain $(-\infty,0) \bigcup (0,\infty)$; Range (y) is $(-\infty,0)\bigcup (0,\infty)$

Function: $y=\sqrt{x}$; domain $(0,\infty)$ and range (y) is $(0,\infty)$

Function $y = \sqrt{4-x}$, domain $(-\infty,,4]$, and range (y) is $[0, \infty)$

Graphs of functions:

The graph of a function f is the graph of the equation $y=f(x)$. It consists of the points in the Cartesian plane whose co-ordinates $(x,y)$ are input-output pairs for f.

Not every curve you draw is the graph of a function. A function f can have only one value f(x) for each x in its domain so no vertical line can intersect the graph of a function more than once. Thus, a circle cannot be the graph of a function since some vertical line intersect the circle twice. If a is in the domain of a function f, then the vertical line $x=a$ will intersect the graph of f in the single point $(a, f(a))$.

Example 4: Graph the function $y=x^{2}$ over the interval $[-2.2]$. (homework).Thinking further: so plotting the above graph requires a table of x and y values; but how do we connect the points ? Should we connect two points by a straight line, smooth line, zig-zag line ??? How do we know for sure what the graph looks like between the points we plot? The answer lies in calculus, as we will see in later chapter. There will be a marvelous mathematical tool called the derivative to find a curve’s shape between plotted points. Meanwhile, we will have to settle for plotting points and connecting them as best as we can.

PS: (1) you can use GeoGebra, a beautiful freeware for plotting various graphs, and more stuff https://www.geogebra.org/ (2) If you wish, you can use a TI-graphing calculator. This is a nice investment for many other things like number theory also. See for example,

https://www.amazon.in/Texas-Instruments-Nspire-Graphing-Calculator/dp/B004NBZAYS/ref=sr_1_2?crid=3JSHJUOZMDMUS&keywords=ti+nspire+cx&qid=1569334614&s=electronics&sprefix=TI+%2Caps%2C267&sr=1-2

Meanwhile, you need to be extremely familiar with graphs of following functions; plot and check on your own:

$y=x^{3}$, $y=x^{2/3}$, $y=\sqrt{x}$, $y=\sqrt[3]{x}$, $y=\frac{1}{x}$, $y=\frac{1}{x^{2}}$, $y=mx$, where $m \in Z$, $y=x^{3/2}$

Sums, Differences, Products and Quotients

Like numbers, functions can be added, subtracted, multiplied and divided (except where the the denominator is zero) to produce new functions. If f and g are functions, then for every x that belongs to the domains of BOTH f and g, we define functions: $f+g$, $f-g$, $fg$ by the formulas:

$(f+g)(x)=f(x)+g(x)$,

$(f-g)(x)=f(x)-g(x)$

$(fg)(x)=f(x)g(x)$

At any point $D(f) \bigcap D(g)$ at which $g(x) \neq 0$, we can also define the function $f/g$ by the formula:

$(\frac{f}{g})(x)=\frac{f(x)}{g(x)}$, where $g(x) \neq 0$

Functions can also be multiplied by constants. If c is a real number, then the function cf is defined for all x in the domain of f by $(cf)(x)=cf(x)$

Example 5:

Function $f$, formula $y=\sqrt{x}$, domain $[0,\infty)$

Function $g$, formula $g(x)=\sqrt{(1-x)}$, domain $(-\infty, 1]$

Function $3g$, formula $3g(x)=3\sqrt{(1-x)}$, domain $(-\infty, 1]$

Function $f+g$, formula $(f+g)(x)=\sqrt{x}+\sqrt{(1-x)}$, domain $[0,1]=D(f) \bigcap D(g)$

Function $f-g$, formula $(f-g)(x)=\sqrt{x}-\sqrt{(1-x)}$, domain $[0.1]$

Function $g-f$, formula $(g-f)(x)=\sqrt{(1-x)}-\sqrt{x}$, domain $[0,1]$

Function $f . g$, formula $(f . g)(x)=f(x)g(x) = \sqrt{x(1-x)}$, domain $[0,1]$

Function $\frac{f}{g}$, formula $\frac{f}{g}(x)=\frac{f(x)}{g(x)}=\sqrt{\frac{x}{1-x}}$, domain is $[0,1)$

Function $\frac{g}{f}(x) = \frac{g(x)}{f(x)}=\sqrt{\frac{1-x}{x}}$, domain $(0,1]$

Composite Functions:

Composition is another method for combining functions.

Definition:

If f and g are functions, the composite function $f \circ g$ (f “circle” g) is defined by $(f \circ g)(x)=f(g(x))$. The domain of $f \circ g$ consists of the numbers x in the domain of g for which $g(x)$ lies in the domain of f.

The definition says that two functions can be composed when the image of the first lies in the domain of the second. To $(f \circ g)(x)$ we first find $g(x)$ and second find $f(g(x))$.

Clearly, in general, $(f \circ g)(x) \neq (g \circ f)(x)$. That is, composition of functions is not commutative.

Example 6:

If $f(x)=\sqrt{x}$ and $g(x)=x+1$, find (a) $(f \circ g)(x)$ (b) $(g \circ f)(x)$ (c) $(f \circ f)(x)$ (d) $(g \circ g)(x)$

Solution 6:

a) $(f \circ g)(x) = f(g(x))=\sqrt{g(x)}=\sqrt{x+1}$, domain is $[-1, \infty)$

b) $(g \circ f)(x)=g(f(x))=f(x)+1=\sqrt{x}+1$, domain is $[0, \infty)$

c) $(f \circ f)(x)=f(f(x))=\sqrt{f(x)}=\sqrt{\sqrt{x}}=x^{\frac{1}{4}}$, domain is $[0, \infty)$

d) $(g \circ g)(x)=g(g(x))=g(x)+1=(x+1)+1=x+2$, domain is $\Re$ or $(-\infty, \infty)$

Even functions and odd functions:

A function f(x) is said to be even if $f(x)=f(-x)$. That is, the function possesses symmetry about the y-axis. Example, $y=f(x)=x^{2}$.

A function f(x) is said to be odd if $f(x)=-f(-x)$. That is, the function possesses symmetry about the origin. Example $y=f(x)=x^{3}$.

Any function can be expressed as a sum of an even function and an odd function.

A function could be neither even nor odd.

Note that a function like $y^{2}=x$ possesses symmetry about the x-axis !!

Piecewise Defined Functions:

Sometimes a function uses different formulas or formulae over different parts of its domain. One such example is the absolute value function:

$y=f(x) = |x|=x$, when $x \geq 0$ and $y=-x$, when $x<0$.

Example 7:

The function $f(x)=-x$, when $x<0$, $y=f(x)=x^{2}$, when $0 \leq x \leq 1$, and $f(x)=1$, when $x>1$.

Example 8:

The greatest integer function:

The function whose value at any number x is the greatest integer less than or equal to x is called the greatest integer function or the integer floor function. It is denoted by $\lfloor x \rfloor$.

Observe that $\lfloor 2.4 \rfloor =2$; $\lfloor 1.4 \rfloor =1$; $\lfloor 0 \rfloor =0$; $\lfloor -1.2 \rfloor =-2$; $\lfloor 2 \rfloor =2$; $\lfloor 0.2 \rfloor =0$$\lfloor -0.3 \rfloor =-1$; $\lfloor -2 \rfloor =-2$.

Example 9:

The least integer function:

The function whose value at any number x is the smallest integer greater than or equal to x is called the least integer function or the integer ceiling function. It is denoted by $\lceil x \rceil$. For positive values of x, this function might represent, for example, the cost of parking x hours in a parking lot which charges USD 1 for each hour or part of an hour.

Cheers,

Nalin Pithwa

This site uses Akismet to reduce spam. Learn how your comment data is processed.