0% found this document useful (0 votes)
24 views36 pages

Functions of Single Variable in Statistics

Uploaded by

harshssr4
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views36 pages

Functions of Single Variable in Statistics

Uploaded by

harshssr4
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UNIT 1

FUNCTION OF A SINGLE
VARIABLE

Structure
1.1 Introduction 1.5 Some Special Functions
having Applications in
Expected Learning Outcomes
Statistics, Probability and
1.2 Constant and Variable Machine Learning
Quantity
1.6 Summary
1.3 Interval and its Types
1.7 Terminal Questions
1.4 Definition, Notations and
1.8 Solutions/Answers
Pictorial Presentation of a
Function

1.1 INTRODUCTION
In statistics, we use parameters for population characteristics such as mean,
variance, etc. Constants and variables are also used in statistics. So, it
becomes important to understand the distinction between fixed constant,
parameter and variable which is discussed in Sec. 1.2. Another important thing
that we are going to use on many occasions in different courses is the interval.
In Sec. 1.3 different types of intervals are discussed. To understand many
concepts of probability and statistics such as probability mass function,
probability density function, cumulative distribution function, likelihood function,
etc. you should have a good understanding of function, therefore, a brief
overview of the function is given in Sec. 1.4. There are some special functions
which have their applications in statistics, probability and machine learning
such as linear, polynomial, logarithm, exponential, modulus functions, logistic
sigmoid function, etc. which are discussed in Sec. 1.5. In the course MST-024
on machine learning you will also use many other functions such as loss
function, distance function (Manhattan distance, Euclidean distance,
Chebyshev distance), etc. The distance function is discussed in Unit 3.

What we have discussed in this unit is summarised in Sec. 1.6. Self


Assessment Questions (SAQs) have been given in some sections which are
generally based on the content discussed in that section. But to give you a
good practice of what we have discussed in this unit, some more questions 9
Real Analysis based on the entire unit are given in Sec. 1.7 under the heading Terminal
Questions. One of the characteristics of IGNOU study material is that it is self-
contained. To make it self-contained regarding solutions of all the SAQs and
Terminal Questions we have given solutions of all the SAQs and Terminal
Questions of this unit in Sec. 1.8. To best utilise this section, it is
recommended that after going through all the concepts discussed in the unit
first you should try solutions of all the SAQ’s and Terminal Questions yourself.
In the case, your answer does not match with the answer given in the solution
of the same you may give it another try if still not matching you may refer to
the given solution and identify the concept where you need to improve.

In the next unit, you will study types of functions, countable sets, continuity
and differentiability of a function.

Expected Learning Outcomes


After completing this unit, you should be able to:

❖ define different types of constants, variables, and intervals, and can give
examples of each;

❖ define a function and obtain its domain and range;

❖ evaluate the value of a function at given points; and

❖ plot a graph of a function and identify its graphical behaviour.

1.2 CONSTANT AND VARIABLE QUANTITY


Suppose someone wants to know about you then perhaps he/she should
know your name, the background of the family you belong to, your educational
qualifications, how good as a human being you are, other achievements, etc.
Similarly, if you want to know/study the subject statistics then it requires that
first, you should have an understanding of some rules of mathematics.
Understanding these rules of mathematics will make the journey of studying
tools/techniques of the subject of statistics easy as well as interesting.
Understanding which tools/techniques of the subject statistics will apply in a
given situation is a long journey. Purpose of different courses of this master’s
degree programme [Link]. Applied Statistics is to start this journey smoothly
and in a sequence. Understanding the mathematics rules required to study
statistics is not hard if you start from the basics. In fact, when you start from
basic, learning any subject becomes interesting and creates a hunger to learn
more and more. Like your name, the subject that we are going to discuss here
also has its name called mathematics. Unlike your one family learning
mathematics starts from knowing about its many families called families of
numbers. You know about these families of numbers from your school
mathematics. Let us recall these well-known families of numbers mentioned as
follows.

Family of natural numbers: = {1, 2, 3, 4, …} … (1.1)

Family of whole numbers: W = {0, 1, 2, 3, 4, …} … (1.2)


10
Family of integers: = {…, ̶ 3, ̶ 2, ̶ 1, 0, 1, 2, 3, …} … (1.3) Function of a
Single
Variable
p 
Family of rational numbers: =  : p, q  , q  0, ( p, q ) = 1 … (1.4)
q 

where (p, q) represents the greatest common divisor (gcd) or highest common
factor (hcf) of p and q

Family of irrational numbers: A number on the real line which cannot be


expressed in p/q form where p and q are integers and q is not equal to zero is
called an irrational number. In books on mathematics generally, no notation is
specified for the set of all irrational numbers like is used for the set of all
rational numbers. … (1.5)
Family of real numbers: =  , where  represents the set of all
irrational numbers. … (1.6)

Family of complex numbers: = {a + ib : a, b  }, where the symbol i is


read as iota and denotes the square root of – 1, i.e., i = −1, with i2 = −1. (1.7)

Note 1: In higher mathematics family of natural, integer, rational, real and


complex numbers are denoted by the symbols , , , , and respectively.

After getting the idea about these different families of numbers, the next thing
that you should be familiar with is the meaning of constant and variable.
Actually, you have used them so many times in school mathematics. Here, we
are discussing them because we want to further classify them. In fact, they are
a particular type of quantity so the story begins by defining the quantity itself
as follows.

Quantity
In mathematics and statistics, quantity means those things on which four basic
mathematical operations: addition, subtraction, multiplication and division can
be applied. For example: (i) 2, 5 (ii) population mean (μ) (iii) number of
children per family (iv) all real numbers between 2 and 3 including 2 and 3,
etc. all are examples of different types of quantity which you will come across
during your study of different courses of [Link]. Applied Statistics programme.

A quantity can be classified as a constant or a variable quantity. Constant


quantity can be further classified as fixed constant and arbitrary
constant/parameter. Variable quantity can be further classified as discrete and
continuous. All these classifications are shown in Fig. 1.1.

Fig. 1.1: Types of quantity in mathematics and statistics 11


Real Analysis Constant Quantity

A quantity which remains same (unchanged) throughout a particular problem


or distribution is known as a constant quantity. A constant quantity can be
further classified as a fixed constant and arbitrary constant (also known as a
parameter) which are defined as follows:

Fixed Constant: Those types of constants which always remain the same
(unchanged) independent of the place and time are known as fixed constants.

3
For example: 2, , 13, − 17, , etc. are fixed constants because the
2
number 2 will remain the same whether you use it in the morning or evening or
in India or in any other country. Similarly, the number  which is equal to the
quotient of the circumference of a circle (2πr) and its diameter (2r) is a fixed
constant. Value of  does not depend on the length of the radius of the circle.
Also, remember 22/7 is not the exact value of  it is just an approximate
value.
Length of circumference of the circle
Exact value of  = . ... (1.8)
Length of diameter of the same circle

Arbitrary Constant or Parameter: Those types of constants which remain the


same in one problem but may vary from problem to problem or distribution to
distribution are known as arbitrary constants or parameters and are generally
denoted by a, b, c, l, m, n, , , , , 2 , , etc.

For example, from school mathematics, you know that the equation y = x + c
represents a straight line which makes an angle of 450 (⸪ slope is 1 =
coefficient of x if we compare it with y = mx + c) with a positive direction of the
x-axis. For each real value of c, this equation gives a different straight line
refer to Fig. 1.2. Here, c behaves like an arbitrary constant because for a
particular line, its value is a fixed constant but its value varies from line to line.
Similarly, in normal distribution mean (μ) and variance (σ2) are parameters
because they remain fixed constant in a particular normal distribution but vary
from normal distribution to normal distribution refer to Fig. 1.3.

Variable

A quantity which may change its value even in a particular problem is known

as a variable. For example, in the quadratic equation x2 – x – 12 = 0, x is a


variable because it takes two values 4 and – 3.

 x 2 − x − 12 = 0  ( x − 4 )( x + 3 ) = 0  x = 4 or − 3 

A variable can be further classified as discrete and continuous explained as


follows.

Discrete Variable: If the nature of the quantity is such that its possible values
can be written in a sequence then such a quantity is known as discrete in
nature or discrete variable. For example, the number of children in a family
in a country may be 0, 1, 2, 3, … . Here, you know that the minimum possible
number of children in a family is 0 and after 0 the next possible value for the
12
quantity, the number of children in a family is 1. There is no possibility Function of a
Single
between 0 and 1 for the quantity, the number of children in a family. Similarly, Variable
after 1 the next possible value for the quantity, the number of children in a
family is 2 and so on. Here, you can write the possible values in a sequence
(0, 1, 2, 3, …) so the quantity, the number of children in a family is a discrete
quantity and so is an example of a discrete variable. Other examples of
discrete variables are the number of accidents at a particular site on a road,
the number of defective items in a packet of 100 items, the outcome of a die
when it is thrown once, etc.

Continuous Variable: If the nature of the quantity is such that it can take any
possible value between two certain limits, then such a quantity is known as
continuous in nature or continuous variable. In other words, if a quantity is
continuous in nature, then you cannot write all its possible values in a
sequence. For example, you cannot write all real numbers from 2 to 3 in a

Fig. 1.2: Represents graph of straight lines y = x + c for different values of c

Fig. 1.3: Represents graph of probability density functions of the normal


distribution for different values of μ and σ 13
Real Analysis sequence. In fact, you even cannot tell what is the next possible real number
just after 2. If you say 2.1 is the next real number after 2, no it is not the next
real number after 2 because 2.01 is between 2 and 2.1. If you say 2.01 is the
next real number after 2, no it is not the next real number after 2 because
2.001 is between 2 and 2.01. Similarly, if you say 2.001 is the next real
number after 2, no it is not the next real number after 2 because 2.0001 is
between 2 and 2.001 and so on. The more advanced mathematical distinction
between continuous and discrete quantities can be understood after getting an
idea of countable and uncountable sets discussed in Sec. 2.3 of Unit 2 of this
course. Other examples of continuous variables are temperature, height,
weight, age, etc.

1.3 INTERVAL AND ITS TYPES


Interval
In Sec. 1.2 you have become familiar with well-known families of numbers
keep that familiarity in your mind we will recall those families by their names as
and when will need.

In this section, we will study interval and its types. Interval makes sense only
in the family of real numbers and is defined as follows:

Let be the set of all real numbers. Then a set I  is said to be an interval
if whenever a, b  I and a < x  b then x  I. For example, the set of all real
numbers satisfying 2  x  3 is an interval where x can take any real value
between 2 and 3 including 2 and 3. … (1.9)

Now, you have gone through the definition of interval so we can explain the
point why interval makes sense only in the family of real numbers. For
example, consider the family of rational numbers: as 1, 2  then we cannot
form an interval in the family of rational numbers with endpoints 1 and 2
including 1 and 2 because you know that value of 2 up to three decimal
places is 1.414 and so 1  2  2 but 2 is an irrational number, not a
rational number and hence 2  [1, 2] because we are assuming the interval
[1, 2] in the family of rational numbers. That is why interval makes sense only
in the family of real numbers.

Types of Intervals
Intervals are classified on the basis of two criteria:

(a) Whether it contains its endpoints or does not contain its endpoints

(b) Whether its length is finite or infinite

Based on these criteria different types of intervals are defined as follows:

(a) Different Types of Intervals based on the Criteria of Whether it


contains its endpoints or does not contain its endpoints

On the basis of endpoints criterion, an interval may be classified as an


open or a closed or one side open other side closed interval defined as
14 follows:
Open Interval: An interval I  with end points a and b (a < b) is called Function of a
Single
an open interval if it contains all real numbers between a and b but does Variable
not contain end points a and b. An open interval with endpoints a and b
is denoted by (a, b) and mathematically is defined as follows:
( a,b ) = x  : a  x  b … (1.10)

For example, open interval (2, 5) contains each real number lying
between 2 and 5 but does not contain 2 and 5. To represent an open
interval on real line we make open dots at both endpoints. Fig. 1.4 (a)
indicates it on the real line.
i.e., x  (2, 5)  2  x  5
Closed Interval: An interval I  with endpoints a and b (a < b) is
called closed interval if it contains all real numbers between a and b and
also contains endpoints a and b. A closed interval with endpoints a and b
is denoted by [a, b] and mathematically is defined as follows:
[a, b] = {x  : a  x  b} … (1.11)

For example, closed interval [2, 5] contains each real number lying
between 2 and 5 including 2 and 5. To represent a closed interval on a
real line we make solid dots at both endpoints. Fig. 1.4 (b) indicates it on
the real line.
i.e., x  [2, 5]  2  x  5

Left Open and Right Closed Interval: An interval I  with endpoints


a and b (a < b) is called a left open and right closed interval if it contains
all real numbers between a and b and also includes only one endpoint b.
A left open and right closed interval with endpoints a and b is denoted by
(a, b] and mathematically is defined as follows:
(a,b] = {x  : a  x  b} … (1.12)

For example, left open and right closed interval (2, 5] contain each real
number lying between 2 and 5 including end point 5 but does not contain
end point 2. To represent it on real line we have to make an open dot at
2 and a solid dot at 5. Fig. 1.4 (c) indicates it on the real line.
i.e., x (2,5]  2  x  5

Left Closed and Right Open Interval: An interval I  with endpoints


a and b (a < b) is called a left closed and right open interval if it contains
all real numbers between a and b and also includes only one end point
a. A left closed and right open interval with endpoints a and b is denoted
by [a, b) and mathematically is defined as follows:

[a, b) = {x  : a  x  b} … (1.13)

For example, left closed and right open interval [2, 5) contain each real
number lying between 2 and 5 including endpoint 2 but does not contain
endpoint 5. To represent it on a real line we have to make a solid dot at
2 and an open dot at 5. Fig. 1.4 (d) indicates it on the real line.
i.e., x  [2, 5)  2  x  5
15
Real Analysis (b) Different Types of Intervals based on the Criteria Whether its length
is finite or infinite

On the basis of the criterion of length of an interval it may be classified


as finite or infinite interval defined as follows:

Length of an Interval: Length of each of the intervals (a, b), [a, b],
(a, b], [a, b) is defined as b − a, a  b.
i.e., length of the interval = difference of the end points … (1.14)
For example, if I = (2, 7) then (I) = 7 − 2 = 5, , where (I) denotes the
length of the interval I.

Finite Interval: An interval is said to be finite if its length is finite. (1.15)


For example, if I = (– 3, 5) then (I) = 5 – (– 3) = 5 + 3 = 8 which is finite.
 interval I = (– 3, 5) is finite.

Infinite Interval: An interval is said to be infinite interval if its length is


not finite. … (1.16)

For example,
(i) The set {x  : x  a, a  } is an infinite interval and is denoted by
(a, ). Fig. 1.4 (e) Indicates the infinite interval (2, ) on real line.

(ii) The set {x  : x  a, a  } is an infinite interval and is denoted by


( − , a). Fig. 1.4 (f) indicates the infinite interval ( − , 5) on real
line.

Similarly, infinite intervals [a,  ), (– ,a ] are defined as


[a,  ) = { x  R : x  a} , where ‘a’ is a fixed real number
( − , a] = { x  R : x  a}, where ‘a’ is a fixed real number

Also, ( − , ) = { x  R : −   x  }, where ‘a’ is a fixed real number

Fig. 1.4 (g) to (i) indicate the infinite intervals ( − , ), [2, ), and ( − , 5]
respectively on real line.

Fig. 1.4: Visualisation of (a) open interval (b) closed interval (c) left open and
16 right closed (d) left closed and right open (e to i) infinite intervals
Remark 1 Function of a
Single
Variable
• Each interval contains infinitely many elements.
• Each interval is an infinite set but an infinite set may or may not be an
interval. For example, , , are infinite sets but are not intervals.

• A set may or may not be an interval. For example, {2, 7} is a set but not
an interval.
• , set of all real numbers, is an infinite interval given by = ( − , ).

• Remember that − and  are not included in the set of real numbers.
Also, if extreme value is  or − , then open bracket is used on that side
of the interval having  or − . In Unit 3 of this course we will extend set
of real numbers by including two special numbers −  and +  and we
will denote this new set by *
= ( − ,  )  {− , + } =  {− , + }.

• When we say that x is a finite number (real number) it means that


−   x  .

Now, we are in a position to define a function.

1.4 DEFINITION, NOTATIONS AND PICTORIAL


PRESENTATION OF A FUNCTION
Definition of a Function

You know about function from school mathematics. You can treat function as a
machine if it works in such a way that (i) corresponding to each input it gives
output and (ii) output is unique for each input. Mathematically, a function is
defined as follows:

Let X and Y be two non-empty sets. Then a rule which associates each
element of X to a unique element of Y is called a function from X to Y. X is
called domain of the function. Y is called co-domain of the function, and the
set of only those values of Y for which function is defined is called range of the
function. That is, the subset { y  Y : y = f(x) for some x  X} of Y is called
range of the function. … (1.17)

If we treat function as a machine then the set of all inputs is called domain of
the function and the set of all outputs is called range of the function. If we
define a function f : → by

y = f(x) = x 2 + 1, x 

then its visualisation as a machine is shown in Fig. 1.5.

Usual Notations used for Defining a Function

(i) A function is generally denoted by f, g, h, , , etc., in the case of above


definition we write f: X → Y and read as f is a function from X to Y.

(ii) A function f: X → Y is generally described by writing y = f(x), x  X,


where f(x) is an expression in terms of x .
17
Real Analysis For example, the function used in Fig. 1.5 has expression f(x) = x2 + 1.

Fig. 1.5: Visualisation of treating function as a machine

Pictorial Presentation of a Function

Visualisation of a concept helps in understanding the concept in a better way.


There are two
conditions for a rule to
Following the same strategy, we are using pictorial presentation of a function
be a function. which is an attempt to explain the idea of the function through diagram known
(i) Each element of X as pictorial presentation. The box given in the margin of this page specifies the
must be associated to two requirements for a rule to be a function. These two requirements are also
some element of Y. satisfied by the association of daughter with her mother. So, to explain the
(ii) There is unique idea of the function through pictorial presentation we will continue with
element of Y example of daughters and mothers.
corresponding to
each element of X. Let X = D = set of daughters and Y = M = set of mothers. Then consider the
following situations given in Fig. 1.6 (a) to (d) with the help of the diagrams.

18 Fig. 1.6: (a) to (d) Pictorial presentation of rules f, g, h, ϕ


The rule f shown in Fig. 1.6 (a) is a function because each daughter has Function of a
Single
unique mother. [i.e., both conditions mentioned in the box are satisfied] and Variable
domain of the function f = set of all daughters = D = d1, d2 , d3 
co-domain of f = set of all mothers = M = m1, m2 , m3 , m 4 
range of f = set of those mothers who have at least one daughter
= m1, m2 , m3 

Note 2: One point which may come in your mind is that if m4 is a mother then
there should be at least one daughter of the mother m4 . But as we know that
to become a mother it is not necessary that there should be a daughter. A
mother may have only one son or only two sons or more than two sons without
a daughter.

The rule g shown in Fig. 1.6 (b) is not a function because daughter d1 has two
mothers m1 and m2 which is not possible. [i.e., condition (ii) given in the box is
not satisfied]

The rule h shown in Fig. 1.6 (c) is not a function because daughter d3 has no
mother. If the daughter d3 came in this world, then there should be some
mother of the daughter d3 . [i.e., condition (i) given in the box is not satisfied]

The rule ϕ shown in Fig. 1.6 (d) is a function because each daughter has
unique mother. We see that both daughters d1, d2 have the same mother, no
problem it is possible. Further mothers m3 , m4 have no daughters again no
problem it is also possible. In this case:

domain of the function f = {d1, d2 , d3 } = D = set of all daughters,

co-domain of the function  = {m1, m2 , m3 , m4 } = M = set of all mothers and


range of the function f = {m1, m2 } = set of only those mothers who have at least
one daughter.

Remark 2

• If f : X → Y is a function given by y = f(x) then x is known as pre image


of y and y is known as image of x.

• If y = f(x) is a function then values of y depend on values of x. So, y is


known as dependent variable and x is known as independent
variable.

• In descriptive statistics we also use dependent and independent


variables, especially in correlation and regression. In biostatistics
terminology that is generally followed is: independent variable is known
as regressor and dependent variable is known as response variable.
In the course MST-024 on machine learning independent variable is
known as feature and dependent variable is known as target variable.
So, keep this terminology alert in your mind.

Some Examples of Functions

Example 1: Let f : → be defined by


19
Real Analysis f(n) = 3n, n 
Express the function diagrammatically. Also write domain, range and co-
domain of the function. Also make the graph of this function. Further, if instead
of from to suppose f is from to draw its graph.

Solution: f : → be defined by

f(x) = 3n, n

 f(1) = 3, f(2) = 6, f(3) = 9 and so on.

Pictorial presentation of the function is shown in Fig. 1.7.

Fig. 1.7: Pictorial presentation of the function

Domain of the function f = {1, 2, 3, }=

Range of the function f = Set of only those values for which function is defined
= {3, 6, 9, …}

Co-domain = {1, 2, 3, }=

Graph of the function when both domain and co-domain are set of natural
numbers is shown in Fig. 1.8 (a). Graph of the function when both domain and
co-domain are set of real numbers is shown in Fig. 1.8 (b). Note the effect of
domain and range on the graph of a function. Here mathematical expression
of the function is the same but domain and range are different. In Fig. 1.8 (a)
only points at (1, 1), (2, 2), (3, 3), (4, 4), … represent its graph while in Fig. 1.8
(b) complete line represent its graph.

(a) (b)
Fig. 1.8: Graph of the function f(x) = 3x (a) when f is from to (b) when f is
20 from to
Example 2: Find the domain of the function f : → , defined by Function of a
Single
Variable
f(x) = (x − 3)(5 − x) , x

Also evaluate f(3), f(4), f(5), f(7).

Solution: Given function is

f(x) = (x − 3)(5 − x), x

For f(x) to be real, the quantity under the square root should be non-negative
and hence
(x − 3)(5 − x)  0

 − (x − 3)(x − 5)  0

 when we multiply by − 1 on both sides of an 


 (x − 3)(x − 5)  0 inequation then its inequality changes. For more 
detail you may refer Sec . 6.7 of Unit 6 of this course 

Now, if we choose x less than 3, the LHS of this inequality comes out to be
(–ve) (–ve) = + ve hence does not satisfy the inequality.

Also, if we choose x greater than 5, the LHS of this inequality comes out to be
(+ve) (+ve) = +ve again does not satisfy this inequality.

But, if we take 3 < x < 5, the LHS becomes (+ve) (–ve) = –ve and hence
satisfies the inequality. Also, x = 3 and x = 5 satisfy inequality. So, required
domain of the given function is [3, 5].

Now, the number 7 does not lie in the domain of f so f(7) cannot be obtained
for this function. However, 3, 4 and 5 all lie in the domain of f so values of f at
3, 4 and 5 can be obtained and are given as follows.

f(3) = (3 − 3)(5 − 3) = 02 = 0 =0

f(4) = (4 − 3)(5 − 4) = 1 1 = 1

f(5) = (5 − 3)(5 − 5) = 20 = 0 = 0

Now, you can try the following Self Assessment Question.


SAQ 1

Find the domain and range of the function f : → given by

1
f(x) = , x  . Also, evaluate f(1), f ( 3 ) , f( − 5) .
x−2

1.5 SOME SPECIAL FUNCTIONS HAVING


APPLICATIONS IN STATISTICS,
PROBABILITY AND MACHINE LEARNING
In the previous section you have seen that function is a rule (satisfying two
conditions mentioned in the box at page number 18) which associates the
21
Real Analysis elements of one set to the elements of another set. In different courses of the
programme [Link]. Applied Statistics (MSCAST) you will used many functions.
Some well-known and commonly used functions are discussed in this section.
Let us start with the easiest function known as constant function.

Constant Function
Suppose you have a special coin having head on both sides. Then whenever
you will throw it, each time its outcome will be head. Ignore the possibility of
landing on edge like Sholay film. If X is a variable having value 1 if head
appears and 0 otherwise then X will always take value 1. Such type of
behaviour is represented by a constant function in mathematics and
degenerate random variable in probability theory. In mathematics constant
function is defined as follows:

Let X, Y  , then a function f : X → Y is said to be a constant function if it


associates each element of its domain to a single number in its co-domain and
in general is defined as

f(x) = a,  x , where a is a real constant. … (1.18)

i.e., a function is constant if its range is a singleton set.

For example,

(i) f: → defined by

f(x) = 3, n

is a constant function because all elements of the domain are associated


to the single element 3 and its pictorial presentation is shown in the Fig.
1.9 while graphical presentation of this function is shown in Fig. 1.10 (a).

Fig. 1.9: Pictorial presentation of the constant function f(x) = 3

(ii) f: → defined by

f(x) = 3, x 

is also a constant function and its graph is shown in Fig. 1.10 (b).

22
Function of a
Single
Variable

(a) (b)

Fig. 1.10: Graph of the constant function f(x) = 3 (a) when f is from to (b) when f is
from to

Remark 3

If you connect this function with the example of daughters and mothers then
you find that all daughters have 3 as their mothers. But then mother 3 has
infinitely many daughters. In real life you will not find a mother who has infinite
daughters. So, keep in mind that example of daughters and mothers is given
just for better understanding of the two conditions for a rule to become a
function. So, limit that example only for understanding the two conditions
required for a rule to be a function. The next function that you are going to
study is identity function. You will see that identity function associates each
element with itself. But in real life a daughter cannot be mother of herself. So,
again the same reason example of daughters and mothers is given just for
better understanding of the two conditions for a rule to become a function.
Keep this point in mind.

Identity Function
You know from school mathematics that when you multiply a real number with
1 outcome will be the same number itself. That is, for any real number a, we
have a.1 = 1.a = a. In the universe of functions identity function plays the same
role as 1 plays in the family of real numbers. In mathematics identity function
is defined as follows:

Let X  , a function f : X → X is said to be an identity function if it associates


each element with itself and in general it is defined as

f(x) = x, xX … (1.19)

For example,

(i) f: → defined by

f(n) = n, n N … (1.20)

is an identity function because it associates each natural number with


itself. Pictorial presentation of this function is shown in the Fig. 1.11.

23
Real Analysis

Fig. 1.11: Pictorial presentation of identity function in the world of natural


numbers

(ii) Instead of set of natural numbers if you want to define identity function in
the set of real numbers then it is defined the same way just replace
by as follows:

f: → defined by

f(x) = x, x … (1.21)

Graphs of identity function in the family of natural numbers and in the


family of real numbers are shown in Fig. 1.12 (a) and (b) respectively.

(a) (b)

Fig. 1.12: Graph of the identity function f(x) = x (a) when f is from to (b)
when f is from to

Polynomial Function
A function f : → is said to be a polynomial function of degree n (only
possible values of n are 0, 1, 2, 3, 4, …) if it is defined as

f(x) = a0 x n + a1x n−1 + a 2 x n −2 + ... + an−1x + an , x  … (1.22)

where a0 , a1, a2 , ..., an−1, an  , a0  0 are constants

e.g., f(x) = 2x3 + x 2 − x + 5 , is a polynomial function of degree 3. But the


expression f(x) = 2x 3/2 + x 2 is not a polynomial because the exponent of x is
3/2 in the first term which is not allowed in a polynomial. Similarly, the
1
expression f(x) = x + is not a polynomial because in the second term
x
exponent of x is – 1 which is not allowed in a polynomial. Possible values of
24 exponent in a polynomial are from family of whole numbers, i.e., 0, 1, 2, 3, ….
Zero of a Polynomial: If f(x) is a polynomial then those values of x which Function of a
Single
makes value of polynomial zero are known as zeros of the polynomial. That is Variable
if x = a is such that f(a) = 0 then we say that x = a is a zero of the polynomial.

For example, if f(x) = x2 – x – 12 then f(4) = 42 – 4 – 12 = 0. So, x = 4 is a zero


of the polynomial f(x) = x2 – x – 12.

Multiplicity of a Zero of a Polynomial: Multiplicity of a zero tells us about the


behaviour of the polynomial near zero. If f(x) = (x – a)m(x – b)n(x – c) then we
say that multiplicity of zeros a, b, c are m, n, 1 respectively.

For example, if f(x) = (x – 3)7(x – 5)9(x – 13) then multiplicity of zeros 3, 5 and
13 are 7, 9 and 1 respectively.

You know that a polynomial of degree 0, 1, 2, 3, 4, 5 are known as constant,


linear, quadratic, cubic, quartic and quintic polynomial. In statistics we use
polynomials in regression analysis, time series analysis, etc. The shape of a
polynomial is dictated by three things (i) degree of the polynomial (ii) sign of
the leading coefficient (iii) multiplicity of the zeros of the polynomial. Let us
visualise the effect of these three things through Fig. 1.13 (a) to (f) and Fig.
1.14 (a), (b) to Fig. 1.16 (a), (b) which will help you to identify the suitable
polynomial which fits the given data. Fig. 1.13 (a) to (f) shows respectively
graphs of the following polynomial functions:
f(x) = 2, f(x) = − 2, f(x) = x + 1, f(x) = − x + 1,
f(x) = (x + 1)(x − 1) = x 2 − 1, f(x) = − x 2 − 1

Fig. 1.13: Graphs of the different polynomials of degree 0, 1 and 2 with positive leading
coefficient in (a), (c), (e) and negative leading coefficient in (b), (d), (f) and
having root(s) multiplicity one

25
Real Analysis Polynomials shown in Fig. 1.14 (a), (b) to Fig. 1.16 (a), (b) are mentioned in
the graphs. From the graphs of these polynomials note that:

• Even Degree and Positive Leading Coefficient: End behaviour of the


curve on both sides is upward. Refer Fig. 1.16 (a). … (1.23)

• Even Degree and Negative Leading Coefficient: End behaviour of the


curve on both sides is downward. Refer Fig. 1.16 (b). Note that in the
case of even degree either both ends will be upward or downward.
… (1.24)

• Odd Degree and Positive Leading Coefficient: End behaviour of the


curve will be left downward but right upward. Refer Fig. 1.14 (a) and Fig.
1.15 (a). … (1.25)

• Odd Degree and Negative Leading Coefficient: End behaviour of the


curve will be left upward but right downward. Refer Fig. 1.14 (b) and Fig.
1.15 (b). Note that in the case of odd degree both ends behave opposite
to each other, i.e., if one end is upward then another will be downward.
… (1.26)

• Effect of Even Multiplicity of a Zero: If multiplicity of a zero is even


then graph of the polynomial touches the x-axis at that point. Refer Fig.
1.15 (a) and (b) both zeros at x = ̶ 2 and 2 are of even multiplicity. So,
graphs touch x-axis at both points. In Fig. 1.16 (a) and (b) two zeros at x
= 2 and 3 are of even multiplicity. So, graphs touch x-axis at these
points. … (1.27)

• Effect of Odd Multiplicity of a Zero: If multiplicity of a zero is odd then


graph of the polynomial crosses the x-axis at that point. Further, if
multiplicity is 1 then it crosses x-axis at that zero like a straight line (refer
Fig. 1.14 (a) and (b) it crosses x-axis at three zeros. Also, in Fig. 1.16 (a)
and (b) it crosses x-axis at x = 3.5 but if multiplicity is odd other than 1
like 3, 5, 7, etc. then it crosses x-axis at that zero such that it tries to flat
at zero. Refer Fig. 1.16 (a) and (b) at the zero x = 1. … (1.28)

Fig. 1.14: Graphs of the cubic polynomials (a) with positive leading coefficient, and (b)
negative leading coefficient

26
Function of a
Single
Variable

Fig. 1.15: Graphs of the polynomials of degree 5 (a) with positive leading
coefficient, and (b) negative leading coefficient

Fig. 1.16: Graphs of the 10-degree polynomials having four roots 1, 2, 3 and 3.5
with multiplicities 3, 2, 4, 1 respectively (a) with positive leading
coefficient, and (b) negative leading coefficient

Exponential Function
From school mathematics you know that if you invest Rs P at r% per annum
for a period of n years compounded annually then amount A after n years is
given by
n
 r 
A = P 1 + 
 100 

Suppose P = Rs 1, r = 100% per annum then formula of amount reduces to

A = 2n , where n is time and 2 represents growth rate.

So, if you invest Rs 1 for a period of 4 years and growth rate is 2 then after 4
years your amount will be A = 24 = Rs 16. Such type of functions where we
have a constant in the base and variable (here time) in the power are known
27
Real Analysis as exponential functions. Mathematically, an exponential function is defined as
follows:

A function f : → defined by

f(x) = a x , x , a  0, a  1 … (1.29)

is called an exponential function.

i.e., the nature of an exponential function is of the form = ( constant )


variable

x
 1
For example, f(x) = 2 , g(x) = 10 , h(x) =   , etc. all are exponential
x x

2
functions.

Domain and Range of the Exponential Function: In exponential function


variable x (say) is sitting in exponent of a constant so function is defined for all
real values of the variable x and hence domain of an exponential function is
the set of all real numbers. Suppose f(x) = 2x then note that values of this
function will never be negative and zero for every real value of x

 20 = 1, 21 = 2, 22 = 4, 23 = 8, etc. 
 
2−1 = 1 = 0.5, 2−2 = 1 = 1 = 0.25, 2−3 = 1 = 0.125, etc.
 2 22 4 8 
+
and hence its range is the set of positive real numbers = (0,  ). This is not
only true for this particular exponential function but it is true in general for all
the exponential functions so range of an exponential function is + = (0,  ).
… (1.30)

Graphical Behaviour of Exponential Function: Steepness of an exponential


function is dictated by its rate. Further, if rate is < 1 then with increase in time
its value will decay, and when its rate is > 1 then its value will increase with
time. Fig. 1.17 (a) shows decay as a = 1/2 < 1 while Fig. 1.17 (b) shows
growth as a = 2 > 1. Note that value of each exponential function at x = 0 is 1.
So, graph of every exponential function will pass through the point (0, 1) so
this special point is also indicated in the graph.

Fig. 1.17: Graph of exponential function (a) f(x) = (1/2)x (b) f(x) = 2x

28
Example 3: In the following exponential functions name the rate, time and Function of a
Single
amount. Variable
(i) A = 3n (ii) B = 10m (iii) ak = x (iv) 8(4/3) = 16

Solution: We know that an exponential function can be interpreted as


Amount = (rate)time

Therefore, we have

(i) Amount = A, rate = 3, time = n

(ii) Amount = B, rate = 10, time = m

(iii) Amount = x, rate = a, time = k

(iv) Amount = 16, rate = 8, time = 4/3

Logarithm Function
In Sec. 1.4 you have seen that function can be treated as a machine (refer Fig.
1.5) which gives unique output corresponding to each input. You know that in
an exponential function if rate is 10 and time is 3 then output (amount) will be
1000. If you are interested in another machine (function) which works in such
a way that if output of an exponential function is given as input in this new
machine, then its output should be corresponding input of the exponential
function such a machine (function) is known as logarithm function. In this new
machine rate of exponential function is known as base of the logarithm
function. Table 1.1 explains this inverse relationship between exponential and
logarithm functions and Fig. 1.18 shows both functions as machines
simultaneously.

Table 1.1: Exponential and logarithm functions are inverse of each other

Exponential Function Logarithm Function

Function as a machine Function as a machine

Rate Input Output Base Input Output

2 5 25 = 32 2 32 log2 32 = 5

10 3 103 = 1000 10 1000 log10 1000 = 3

1/2 4 (1/ 2)4 = 1/ 16 1/2 1/16 log1/2 (1/ 16) = 4

2 −5 2− 5 = 1/ 32 2 1/32 log2 (1/ 32) = − 5

10 −3 10− 3 = 1/ 1000 10 1/1000 log10 (1/ 1000) = − 3

1/2 −4 (1/ 2)− 4 = 16 1/2 16 log1/2 16 = − 4

2 0 20 = 1 2 1 log2 1 = 0

e x ex e ex loge x = x

29
Real Analysis Note that when output of an exponential function is given as input to the
logarithm function then output of the logarithm function matches with
corresponding input of the exponential function and vice versa. In the last row
of the Table 1.1 the number e is a special number in mathematic. You have
studied expansion of e x in school mathematics and the same is given as
follows.

x x2 x3 x 4 x5
ex = 1 + + + + + + … (1.31)
1 2 3 4 5

So, value of e can be obtained just replacing x by 1 in this expansion of e x


and the same is given by the infinite series (you will study about infinite series
in Sec. 4.4 of Unit 4 of this course)

1 1 1 1 1
e = 1+ + + + + + … (1.32)
1 2 3 4 5

You know that value of e up-to 3-decimal place is 2.718. In fact, it is an


irrational number. In the course MSTL-001 you will see that this value of e can
be obtained in R by typing exp(1) on R console and hitting enter.

Mathematically, logarithm function is defined as follows:


+
A function f : → is said to be logarithm function if it is defined as
+
y = f(x) = loga x, x  = set of all positive real numbers … (1.33)

where a > 0 and a  1

You have seen that if am = n then in terms of logarithm we write it as


loga n = m.

Domain and Range of the Logarithm Function: Since logarithm function is


inverse of exponential function so range of exponential function will be domain
of logarithm function and domain of exponential function will be range of the
logarithm function. Hence, domain of the logarithm function is + = (0,  ) and
range of the logarithm function is = ( − , ). … (1.34)

Graphical Behaviour of Logarithm Function: If base is < 1 then logarithm


function is decreasing and when its base is > 1 then it is an increasing
function. Note that log10 10 = 1, log10 100 = 2, log10 1000 = 3, log10 10000 = 4. See
the difference between the input numbers (10, 100 = 102, 1000 = 103, 10000 =
104) and output numbers (1, 2, 3, 4). We observe that variation between the
numbers 10, 100, 1000 and 10000 is huge compare to the variation of the
output numbers 1, 2, 3 and 4. This is one of the silent features of logarithm
function and due to this it facilitates graphical represents of the numbers with
large variations. For example, if you want to compare the sizes of the
populations of all Asian countries in the same plot then you should plot values
of population after taking logarithm of population sizes of each country.
Without logarithm plot will not be more informative due presence of two large
populations figures of India and China. Fig. 1.19 (a) and (b) shows graphical
behaviour of logarithm function when a = 1/2 < 1 and when a = 2 > 1. In the
first case logarithm function is decreasing and in the second case it is
30
increasing. Like an exponential function there is a special point in the graph of Function of a
Single
logarithm function. Refer second last row of the Table 1.1 which says that Variable
log2 1 = 0. There is nothing special in base 2 you can take any base according
to the definition of logarithm function its value at 1 will always be 0. So, graph
of every logarithm function will pass through the point (1, 0) which is also
shown in the graph.

Fig. 1.18: Exponential and logarithm functions are machines which undo effect
of each other

Fig. 1.19: Graph of logarithm function (a) f(x) = log1/2 x (b) f(x) = log2 x
31
Real Analysis Finally, following are some important laws of logarithm function

1. loga mn = loga m + loga n … (1.35)

m
2. loga = loga m − loga n … (1.36)
n

3. loga mn = nloga m … (1.37)

4. a loga m = m … (1.38)

5. loga a = 1 … (1.39)

1
6. loga b = … (1.40)
logb a

logn b
7. loga b = this is known as base change formula, in fact we can
logn a
take any base in place of n. … (1.41)

Remark 4

• If base of the logarithm is 10 then it is known as common logarithm.

• If base of the logarithm is e then it is known as natural logarithm and


some time is written as ln x instead of log x.

• When we write log x it means base is e. That is, in most of the cases
base is mentioned only when it is other than e.

Example 4: Solve for x in each part:


(i) log2 64 = x (ii) log4 64 = x (iii) log8 64 = x (iv) log1/4 64 = x
3
(v) log8 16 = x (vi) log 3 81 = x (vii) log16 x = (viii) log2 x = − 3
2

Solution:

(i) log2 64 = x  2x = 64  loga b = m  am = b 


 2 x = 26  x = 6  am = an  m = n 

Similarly,

(ii) log4 64 = x  4 x = 64  4 x = 43  x = 3

(iii) log8 64 = x  8 x = 64  8 x = 8 2  x = 2

(iv) log1/4 64 = x  (1/ 4)x = 64  (1/ 4)x = 43


 (1/ 4)x = (1/ 4)− 3  x = − 3

4
(v) log8 16 = x  8 x = 16  (23 )x = 2 4  23x = 2 4  3x = 4  x =
3

x
(vi) log 3 81 = x  ( 3 )x = 81  3 x/2 = 3 4  =4x =8
2

32
3 Function of a
(vii) log16 x =  (16)3/2 = x  (4 2 )3/2 = x  4 3 = x  x = 64 Single
2 Variable
1 1 1
(viii) log2 x = − 3  2− 3 = x  3
=x =xx=
2 8 8

Sigmoid Logistic Function


In the course MST-012 you will study about probability and random variables.
One of the silent features of probability is that its value lies between 0 and 1.
The value zero means impossible event and 1 means sure event. Output of
sigmoid logistic function also lies between 0 and 1. So whenever there is a
requirement to predict value as probability, sigmoid function is one of
candidates you can think about. Because of this nature, in the course MST-
026 we will use it in neural network as an activation function. Mathematically,
sigmoid logistic function  : → is defined by
1
(x) = , x … (1.42)
1 + e− x

Domain and Range of the Sigmoid Logistic Function: Here x is sitting in


exponent of e (constant) so function is defined for all real values of the
variable x and hence domain of sigmoid logistic function is the set of all real
numbers. That is domain is ( − , ). Also note that e− x being exponential
function will always take positive values for all real values of x and hence the
1 ex
value of the expression or will always lie between 0 and 1, i.e.,
1 + e− x ex + 1
1 ex
0  1 or 0   1 and hence its range is (0, 1). Range suggest
1 + e− x ex + 1
that whenever you have to predict value as probability p (say) you can think
about this function. … (1.43)

Graphical Behaviour of Sigmoid Logistic Function: Note that value of this


function is very close to zero when x is – 5 or less. It approaches to 0 as x
approaches to − . At x = 0 its value is 0.5. It approaches to 1 as x
approaches to . Due to similarity of its shape like S it is known as Sigmoid
function.

Fig. 1.20: Graph of sigmoid logistic function


33
Real Analysis Piecewise Function
Before defining it first we have to understand what we mean by partition of a
set.

Partition of a Set: Let X be a non-empty set then a collection


C = A1, A 2 , A 3 , , A n  of non-empty subsets of X is called a partition of X if it
satisfies following two conditions:

(i) X = A1  A 2  A 3   An

(ii) A i  A j =  for i  j … (1.44)

For example, if X = {1, 3, 7, 9, 12, 13} then the collection of the non-empty
subsets A1 = {1, 3, 7}, A 2 = {9}, A 3 = {12, 13} of X form a partition of X. Another
partition of X may be formed by the non-empty subsets
B1 = {1, 3,}, B2 = {7, 9, 12, 13} of X. Similarly, more partitions can be formed.

Partition of Domain of a Function: Let D  and f : D → be a function. If


the collection of sub-domains D1, D2 , D3 , , Dn satisfies
n
D= Di and Di  D j =  for i  j then we say that the collection containing the
i =1

n sub-domains D1, D2 , D3 , , Dn partition the domain D of the function f. (1.45)

For example, suppose f : [0, 5] → be defined by

 x + 2, 0  x <2

2x, 2  x <3
f(x) = 
 x − 1, x=3
x2 , 3  x 5

then D = [0, 5], D1 = [0, 2), D2 = [2, 3), D3 = {3}, D4 = (3, 5]

The function defined like this in pieces (here we have four pieces) is known as
piecewise function. Often sub-domains are mutually disjoint but, in some
cases if Di  D j   for some i and j then values of ith and jth pieces of the
function at the common point is the same. For example, if in the present
example D1 also includes 2, i.e., D1 = [0, 2] then D1  D2 = {2}. Now value of f
obtained using the first piece and the second piece at x = 2 should match. This
can be seen as follows: … (1.46)

Using the first piece: f(2) = 2 + 2 = 4  2  [0, 2] so f(x) = x + 2

Using the second piece: f(2) = 2(2) = 4  also 2  [2, 3) so f(x) = 2x 

For Indian citizens having age less than 60 years and taxable income Rs x
(rounded in rupees) then calculation of income tax for FY 2020-21 under old
tax regime is a piecewise function given as follows:

34
0, x  250000 Function of a
 Single
5% of (x − 250000), 250001  x  500000 Variable
f(x) = 
12500 + 20% of (x − 500000), 500001  x  1000000
112500 + 30% of (x − 1000000), x  1000001

There are some piecewise functions which are used in mathematics and
statistics. Here, we will discuss only four of them namely: modulus function,
unit step function (both having two pieces), Signum function (having three
pieces), and greatest integer function (having infinite pieces).

Absolute Value Function or Modulus Function


If a machine behaves in such a way that its output is exactly the same number
as was the input in the case its input is zero or positive number, and its output
is negative times the input in the case input is a negative number, then
behaviour of such a machine matches with absolute value function or modulus
function. Mathematically, modulus function is defined as follows:
+
A function f : →  {0} defined by

 x, x  0
f(x) = x =  , x R … (1.47)
− x, x <0

is called absolute value function.

Note that this function has two pieces one piece corresponding to non-
negative values of x and other corresponding to negatives values of x.

Domain and Range of the Modulus Function: In modulus function neither x


appears in denominator nor under the square root sign so it is defined for all
real numbers and hence its domain is = ( − , ). But this function does not
give negative number as output so range of the modulus function is
+
 {0} = [0,  ). … (1.48)

Graphical Behaviour of Modulus Function: Graph of modulus function is


always of v shape. Graph of the function of the form |x – a| is always
symmetrical about the vertical line x = a and vertex of the v is at x = a on the x-
axis. Since values of modulus function is always ≥ 0 so its graph will never go
below x-axis. Graphs of three modulus functions |x + 8|, |x| and |x – 8| are
shown in Fig. 1.21.

Fig. 1.21: Graph of three modulus functions |x + 8|, |x| and |x – 8|

35
Real Analysis Unit Step Function
If a machine behaves in such a way that its output is 1 in the case its input is
zero or positive number, and its output is 0 in the case input is a negative
number, then behaviour of such a machine matches with unit step function.
Mathematically, unit step function is defined as follows:

A function f : → {0, 1} defined by

1, x0
f(x) = U(x) =  , x R … (1.49)
0, x <0

is called unit step function.

Note that like modulus function this function also has two pieces one piece
corresponding to non-negative values of x and other corresponding to
negative values of x.

Domain and Range of the Unit Step Function: Unit step function is defined
for all real values of x hence its domain is = ( − , ). But this function takes
only two values 0 and 1 so range of the unit step function is {0, 1} … (1.50)

Graphical Behaviour of Unit Step Function: Unit step function takes only
two values 0 and 1 so its graph is represented by two horizontal straight lines
y = 0 and y = 1 and is shown in Fig. 1.22. Note the point why we have made
open dot at the position (0, 0) and solid dot at the position (0, 1). Refer Fig. 1.4
where we have said about it.

Fig. 1.22: Graph of unit step function U(x)

Example 5: If f(x) = x − 1 − x − 3 2x − 5 then evaluate f(2), f( −2), f(3),


f( −3), f(1/ 2).

Solution:

f(2) = 2 − 1 − 2 − 3 2(2) − 5 = 2 − −1 − 3 −1 = 2 − 1 − 3 = − 2
 2  0, so by definition of modulus function 2 = 2 
 Also − 1  0, so −1 = − ( −1) = 1 
 

Similarly,

36 f( − 2) = − 2 − 1 + 2 − 3 2( − 2) − 5 = 2 − 3 − 3 − 9 = 2 − 3 − 27 = − 28
f(3) = 3 − 1 − 3 − 3 2(3) − 5 = 3 − − 2 − 3 1 = 3 − 2 − 3 = − 2 Function of a
Single
Variable
f( − 3) = − 3 − 1 + 3 − 3 2( − 3) − 5 = 3 − 4 − 3 −11 = 3 − 4 − 33 = − 34

 1 1 1  1 1 1 1 1
f = − 1 − − 3 2   − 5 = − − 3 − 4 = − − 12 = − 12
2 2 2 2 2 2 2 2

Example 6: Solve the equation 1 − 2x = 5.

Solution:

1 − 2x = 5

 1 − 2x =  5  if x = a  x =  a refer (6.92) in Unit 6 

 1 − 2x = 5 or 1 − 2x = − 5
 − 2x = 5 − 1 or − 2x = − 5 − 1
 − 2x = 4 or − 2x = − 6
 x = − 2 or x = 3

Signum Function
The piecewise function f : → defined by

− 1, x <0

f(x) = sgn(x) = 0, x =0 x … (1.51)
 x 0
1,

is called signum function.

Sometimes this function is also defined as follows:

x
 , x 0
f(x) = sgn(x) =  x … (1.52)
0,
 x =0

Note that this function has three pieces one piece corresponding to negative
values of x, one piece corresponding to x = 0 and third piece corresponding to
positive values of x.

Domain and Range of the Signum Function: This function is defined for all
real values of x and hence its domain is = ( − , ). But this function takes
only three values − 1, 0 and 1 so range of the signum function is { − 1, 0, 1}.
… (1.53)

Graphical Behaviour of Signum Function: Being piecewise function it has


three pieces two of them are lines parallel to x-axis and third piece is a single
point at origin. Its graph is shown in Fig, 1.23 (a). Note that here we have
made two open dots one at the points (0, 1) and other at the point (0, − 1) and
one solid dot at the point (0, 0), i.e., at the origin because at x = 0 function
takes value 0 not 1 or − 1.
37
Real Analysis

Fig. 1.23: Graph of (a) Signum function (b) Greatest integer function

Greatest Integer Function


If for a given real number x, we have a machine which gives output as the
greatest integer less than or equal to x then such a machine is known as
greatest integer function in mathematics. Greatest integer function is denoted
by [x]. Thus, the piecewise function f : → defined by



 − 3, − 3  x<− 2
 − 2, − 2  x<−1

 −1, − 1  x <0

f(x) = [x] = 0, 0  x <1 … (1.54)
1, 1 x<2

2, 2  x <3

3, 3  x<4

is called greatest integer function.

Note that this function has infinite pieces where value in each piece is an
integer. In general, if n is an integer and n ≤ x < n + 1 then [x] = n.

Domain and Range of the Greatest Integer Function: This function is


defined for all real values of x and hence its domain is = ( − , ). Since this
function takes only integral values so range of the greatest integer function is
=  , − 3, − 2, − 1, 0, 1, 2, 3,  . … (1.55)

Graphical Behaviour of Greatest Integer Function: We have seen that it is


a piecewise function having infinite number of pieces. Its graphical behaviour
is shown in Fig. 1.23 (b). Consider the interval [1, 2], note that here we have
made solid dot at the point (1, 1) because at x = 1 function takes value 1. But
at the point (2, 1) we have made an open dot because at x = 2 function takes
value 2 not 1 hence solid dot at the point (2, 2) and open dot at the point (2, 1).
Similarly, graph is plotted in other intervals.

Note 3: In Unit 4 of the course MST-012 you will study cumulative distribution
function (cdf) of a discrete random variable. There you will see that graphical
behaviour of cdf of a discrete random variable is similar to this function. Height
38 at each step will be dictated by the probability at the corresponding value of
the random variable. This is one of the reasons we discussed this function Function of a
Single
here so that understanding of cdf becomes easy for you. Variable

Remark 5

• In the course MSTL-011 you will study floor() function in R. The floor()
function in R is nothing but is simply greatest integer function that is
discussed here.

• In the course MSTL-011 you will study another function namely ceiling()
function in R. The ceiling() function in R gives us the smallest integer
greater than or equal to x. It is generally denoted by  x  . For example,
 4.75  = 5,  4.999  = 5,  4.0001 = 5,  − 4.75  = − 4,  − 0.15  = 0,
 − 100.75  = − 100.

Example 7: Evaluate: (i) sgn( − 1.76) (ii) sgn( 3.89) (iii) sgn( 0) (iv) sgn( 5)
(v)  −1.76 (vi) 3.89 (vii) 0 (viii) 5 (ix)  − 1.76  (x) 3.89  (xi) 0 
(xii) 5 

Solution: We know that


 
 
− 3, − 3  x<− 2 − 2, −3  x− 2
− 2, − 2  x<−1 − 1, − 2  x −1
 
− 1, x  0 −1, − 1  x <0 0, −1  x 0
  
sgn(x) = 0, x = 0 , [x] = 0, 0  x <1 ,  x  = 1, 0  x 1
1, x  0  1  x<2 2, 1 x2
 1, 
2, 2  x <3 3, 2  x 3
 
3, 3  x<4 4, 3  x4
 
 

Therefore,
(i) sgn( − 1.76) = − 1 (ii) sgn( 3.89) = 1 (iii) sgn( 0) = 0 (iv) sgn( 5) = 1

(v)  −1.76 = − 2 (vi) 3.89 = 3 (vii) 0 = 0 (viii) 5 = 5

(ix)  − 1.76  = − 1 (x) 3.89  = 4 (xi) 0  = 0 (xii) 5  = 5

Even and Odd Functions


Even Function: If a function is such that it takes the same value at x and – x
then it is known as even function. So, even function is defined as follows.

A function f(x) is said to be even function if it satisfies

f( − x) = f(x), for all points x of the domain of the function f. … (1.56)

For example,

(i) f(x) = x 6 + x 4 + x 2 is an even function since

f( − x) = ( − x)6 + ( − x)4 + ( − x)2 = x 6 + x 4 + x 2 = f(x)


39
Real Analysis (ii) f(x) = x

f( − x) = − x = ( −1)(x) = ( −1) x = (1) x as −1 = – (–1) = 1

= x = f(x)
 modulus function is an even function

(iii) f(x) = x 2 + x 3

f( − x) = ( − x)2 + ( − x)3 = x 2 − x 3  f(x)


 it is not an even function.
Odd Function: A function f(x) is said to be odd function if it satisfies
f( − x) = − f(x), for all points x of the domain of the function f , i.e., the value
of the function at – x becomes negative times the value of the function at x.
… (1.57)
For example,

(i) f(x) = x 5 + x 3 + x is an odd function since

( )
f( − x) = ( − x)5 + ( − x)3 + ( − x) = − x 5 − x 3 − x = − x 5 + x 3 + x = − f(x)

1
(ii) f(x) = is also an odd function since
x3
1 1 1
f( − x) = = = − 3 = − f(x)
( − x)3
−x 3
x

(iii) f(x) = x 2 + x 3 is not an odd function since


f( − x) = ( − x)2 + ( − x)3 = x 2 − x 3
( )
− f(x) = − x 2 + x 3  f( − x)

We see that if f(x) = x 2 + x 3 then neither f( − x) = f(x) nor f( − x) = − f(x)


 f(x) = x 2 + x 3 is neither even nor odd function.

Graphical Behaviour of Even and Odd Functions: Graph of an even


function is symmetrical about y-axis or a line parallel to y-axis. Graph of odd
function is symmetrical about origin and if you rotate its graph by 1800 then it
remains unchanged. Fig. 1.24 (a), (b) show graphs of even and odd functions
respectively.

Fig. 1.24: (a) Graph of an even function (b) Graph of an odd function
40
Now, you can try the following Self-Assessment Question. Function of a
Single
Variable
SAQ 2

If f(x) = 5 − x − 3 + x + 1 then evaluate f(2), f( −2), f(6), f( −5), f(12).

1.6 SUMMARY
A brief summary of what we have covered in this unit is given as follows:

• In mathematics and statistics quantity means those things on which four


basic mathematical operations addition, subtraction, multiplication and
division can be applied.

• A quantity which remains same (unchanged) throughout a particular


problem or distribution is known as a constant quantity. Those types of
constants which always remain the same (unchanged) independent of
the place and time are known as fixed constant. Those types of
constants which remain same in one problem but may vary from problem
to problem or distribution to distribution are known as arbitrary
constants or parameters.

• A quantity which may change its value even in a particular problem is


known as variable. If the nature of the quantity is such that its possible
values can be written in a sequence then such a quantity is known as
discrete in nature or discrete variable. If the nature of the quantity is
such that it can take any possible value between two certain limits, then
such a quantity is known as continuous in nature or continuous
variable.

• Let be the set of all real numbers. Then a set I  is said to be an


interval if whenever a, b  I and a < x  b then x  I.

• An interval I  R with end points a and b (a < b) is called open interval


if it contains all real numbers between a and b but does not contain end
points a and b. If the interval also includes end points a and b then it is
called closed interval. If interval I includes only one end point b not the
other end point a then it is known as left open and right closed
interval. If interval I includes only one end point a not the other end point
b then it is known as left closed and right open interval.

• Length of each of the intervals (a, b), [a, b], (a, b], [a, b) is defined as
b − a, a  b.

• An interval is said to be finite if its length is finite. An interval is said to


be infinite if its length is not finite.

• Let X and Y be two non-empty sets. Then a rule which associates each
element of X to a unique element of Y is called a function from X to Y. X
is called domain of the function. Y is called co-domain of the function
and the set of only those values of Y for which function is defined is
called range of the function. That is, subset

41
Real Analysis { y  Y : y = f(x) for some x  X} of Y is called range of the function.

• If f : X → Y is a function given by y = f(x) then x is known a pre image


of y and y is known as image of x .

• If y = f(x) is a function then values of y depend on values of x. So, y is


known as dependent variable and x is known as independent
variable.

• In different courses of the programme [Link]. Applied Statistics


(MSCAST) you will use many functions. Some well-known and
commonly used functions are discussed in this unit such as constant,
identity, polynomial, exponential, logarithm, sigmoid, modulus, signum,
greatest integer, even and odd functions.

1.7 TERMINAL QUESTIONS


1. Find the domain and range of the function f : → given by

1
f(x) = , x  . Also, evaluate f(0), f(4), f( −1), f( −5) if possible.
x+5

2. If 54 = 625 then express it in logarithm form.

1
3. If f(x) = then evaluate f(0), f( − log x), f(log x).
1 + e− x

4. If f(x) = (x + 4)3 (x − 3)4 (x + 6)5 (x − 5)6 then which xero has multiplicity

equal to 5.

5. If f(x) = (x + 4)3 (x − 3)4 (x + 6)5 (x − 5)6 then which xero has multiplicity
equal to 4.

1.8 SOLUTIONS/ANSWERS
Self-Assessment Questions (SAQs)
1. If we put x = 2 in the given function then denominator becomes zero and
hence function is not defined at x = 2. Other than 2 it is defined for all
real values of x. That is function takes real values for all real values of x
except x = 2. Hence domain of the function f is {2}.

We note that f(x) cannot be zero for any value of x in its domain.
However, other than 0, f(x) can assume any real value so it’s range is
{0}

1 1 1 1
Now, f(1) = = = −1, f(3) = = = 1 and
1 − 2 −1 3−2 1

1 1 1
f( − 5) = = =−
−5 −2 −7 7

42
2. f(x) = 5 − x − 3 + x + 1 Function of a
Single
Variable
f(2) = 5 − 2 − 3 + 2 + 1 = 5 − −1 + 3
= 5 − ( −( −1)) + 3  − 1  0, so −1 = − ( −1), but 3  0, so 3 = 3 
= 5 − 1+ 3 = 7

Similarly,

f( −2) = 5 − − 2 − 3 + − 2 + 1 = 5 − − 5 + −1
= 5 − ( − ( −5)) + ( − ( −1)) = 5 − 5 + 1 = 1

f(6) = 5 − 6 − 3 + 6 + 1 = 5 − 3 + 7 = 5 − 3 + 7 = 9

f( − 5) = 5 − − 5 − 3 + − 5 + 1 = 5 − − 8 + − 4
= 5 − ( − ( − 8)) + ( − ( − 4)) = 5 − 8 + 4 = 1

f(12) = 5 − 12 − 3 + 12 + 1 = 5 − 9 + 13 = 5 − 9 + 13 = 9

Terminal Questions

1. First of all x + 5 is under the square root so value of x + 5 will be real if


x + 5  0. But x + 5 lies in the denominator so it cannot be zero.
Hence, given function will assume real values only when x + 5 > 0. So,
domain of the given function is ( − 5, ).

We know that value of a square root function is always  0. So, value of


1
x + 5 will be  0. Also note that the function cannot assume
x+5
zero value for any value of x in its domain. Hence, range of the function
is (0, ).

Now,
1 1 5 1 1 1 1 1
f(0) = = = , f(4) = = = , f( − 1) = =
0+5 5 5 4+5 9 3 −1 + 5 2

But value of the function at x = − 5 cannot be calculated because it is


not a point in the domain of the function.

2. We know that if am = b then loga b = m, therefore


54 = 625  log5 625 = 4

1 1 1
3. f(0) = = =
1+ e 0
1+ 1 2

1 1 1
f( − log x) = = =  elog f ( x) = f(x)
1+ e − ( − log x)
1+ elog x
1+ x

1 1 1 1 x
f(log x) = − log x
= = = =
1+ e x +1
−1
 1
1 + elog x log 
1+
1
1+ e x
x

4. Exponent of the factor (x + 6) is 5, hence required zero is obtained by


solving x + 6 = 0 which gives x = − 6. Hence, multiplicity of the zero − 6
is 5.
43
Real Analysis 5. Exponent of the factor (x − 3) is 4, hence required zero is obtained by
solving x − 3 = 0 which gives x = 3. Hence, multiplicity of the zero 3 is 4.

44

You might also like