Functions
Functions
Functions
2.1 Introduction
A
Definition [Function]. Let A and B be two non-empty sets. A relation f : A → B is called a
function (or mapping) if each element x ∈ A is associated with a unique element y ∈ B. The
M
element y is called the image of x under f , denoted as f (x).
I
→ Different elements in A may have the same image in B.
→ Some elements in B may not have a pre-image in A.
11
CHAPTER 2. FUNCTIONS 12
• Range (f ): The actual set of values attained by f , defined as: f (A) = {f (x) | x ∈ A} ⊆ B.
• Codomain: R.
Definition [Graph of a Function]. The graph of a function f : R → R is the set of all points
A
(x, f (x)) in the Cartesian plane, where x belongs to the domain of f . That is,
Graph(f ) = {(x, f (x)) | x ∈ Domain(f )}.
Vertical Line Test : The vertical line test is a method used to determine whether a given graph
represents a function.
It states that a graph represents a function if and only if no vertical line parallel to y − axis
M
intersects the graph at more than one point.
I
y y
The graph above represents a circle (x2 + y 2 = 1), which fails the vertical line test because the
vertical line intersects the graph at two points.
Algebra of Functions : Let f and g be two functions with domains Df and Dg , respectively. We
define the following algebraic operations:
f (x)
f
4. Division: g (x) = g(x)
, provided g(x) , 0
The domain of the resulting function is the intersection of the domains of f and g, except for
division, where we must also exclude points where g(x) = 0.
A
1
√
1. Let f (x) = x−2 , g(x) = x − 1. Find the domain of (f + g)(x) and (f g)(x).
Solution:
M
Thus, the domain is:[1, 2) ∪ (2, ∞)
I
f
1
2. Let f (x) = x−3 , g(x) = log(x − 1). Find the domain of g (x).
Solution:
• The common domain is (1, ∞), but we must exclude x = 3 because f (x) is undefined
there.
Solution:
Solution:
A
x−1 > 0 ⇒ x > 1
So, we initially have (1, ∞) as the possible domain.
M
Thus, the domain is:(1, 2) ∪ (2, ∞)
Definition [Equal Functions]. Two functions f and g are said to be equal if:
I
1. They have the same domain.
2. They have the same output for every input in their domain, i.e.,
f (x) = g(x) ∀x ∈ Df = Dg .
Example- Consider:
√
f (x) = x2 + 3x − 1, g(x) = x − 2
Thus, f (x) is a real-valued function on R, but g(x) is real-valued only on [2, ∞).
CHAPTER 2. FUNCTIONS 15
y
y = x+1
A
Horizontal Line Test : A function f (x) is one-
one if every horizontal line cuts the graph at Horizontal Line
M
f (x1 ) = f (x2 ) ⇒ 2x1 + 3 = 2x2 + 3 ⇒ x1 = x2 .
I
tinct elements x1 , x2 ∈ A such that:
f (x1 ) = f (x2 ) for x1 , x2 .
√
Example- The function f (x) = x3 is surjective because for every y ∈ R, there exists x = 3 y such
that f (x) = y.
Definition [Into Function]. A function f : A → B is called into if there exists at least one
element in B that is not mapped by any element of A.
Key Properties:
• A function that is entirely increasing or entirely decreasing in its whole domain is one-
one.
• A polynomial function f : R → R is onto if its degree is odd, and into if its degree is even.
• An into function can be made onto by redefining the co-domain as the range of the func-
tion.
Example- Here are some examples that illustrate the above properties in detail:
A
1. f (x) = 2x + 3 (increasing, hence one-one).
M
5. f (x) = ex , originally into, becomes onto if the codomain is changed to (0, ∞).
I
Algebraic and Transcendental Functions
x2 +1
• Rational function: f (x) = x−3 .
√
• Root function (Radical): f (x) = x + 2.
• Special functions: Gamma function Γ (x), Bessel function Jn (x), Error function erf(x).
A
Explicit and Implicit Functions
M
where y is explicitly given as a function of x.
I
1. y = 3x + 2
2. y = x2 − 4x + 5
3. y = sin x + 2x
Definition [Implicit Function]. A function is said to be implicit if the dependent and inde-
pendent variables appear in an equation but are not explicitly solved for one variable in terms
of the other.
That is, a function is implicit if it is given in the form:
F(x, y) = 0
where F is a function of both x and y, and solving for y explicitly may not be straightforward.
1. x2 y + xy 2 = 25
2. x3 + y 3 − 3xy = 0
CHAPTER 2. FUNCTIONS 18
Definition [Even Function]. A function f (x) is called even if, f (−x) = f (x), ∀x ∈ Domain.
→ The graph of an even function is symmetric about the y-axis.
1. f (x) = ex + e−x
2. f (x) = x2
A
3. f (x) = cos x
Definition [Odd Function]. A function f (x) is called odd if, f (−x) = −f (x), ∀x ∈ Domain.
→ The graph of an odd function is symmetric about the origin.
1. f (x) = ex − e−x
M
2. f (x) = x3
I
3. f (x) = sin x
6. The sum of an even function and an odd function is neither even nor odd.
7. The only function that is both even and odd is the zero function f (x) = 0.
CHAPTER 2. FUNCTIONS 19
Periodic Function
A
Example- Examples of periodic functions:
M
• tan x, cot x have period π.
I
• sinn x, cosn x, secn x, cscn x (Period: 2π)
• The functions | sin x|, | cos x|, | tan x|, | cot x|, | sec x|, | csc x| have period π.
• The function f (x) = x − ⌊x⌋ (fractional part function) is periodic with period 1.
1. If f (x) is a periodic function with period T , then the following transformations preserve
periodicity with the same period T , provided they are well-defined:
p 1
c · f (x), n f (x), , f (x + c), f (x) ± c,
f (x)
where c is a constant.
2. If a function f (x) has period T , then the function transformed by an affine mapping:
f (ax + b)
T
has period |a|
, provided a , 0.
CHAPTER 2. FUNCTIONS 20
3. If f1 (x), f2 (x), f3 (x) are periodic functions with respective periods T1 , T2 , T3 , then their lin-
ear combination:
h(x) = af1 (x) ± bf2 (x) ± cf3 (x)
is periodic with a period that is either lcm(T1 , T2 , T3 ) or a divisor of lcm(T1 , T2 , T3 ), depend-
ing on the specific properties of the functions involved.
Composite Function
A
posite function of f and g, denoted as g ◦ f : A → C, is defined as:
(g ◦ f )(x) = g(f (x)), ∀x ∈ A.
This means that for each input x ∈ A, we first apply f to get f (x) ∈ B, and then apply g to obtain
g(f (x)) ∈ C.
M
f (x) = x2 , g(x) = x + 1.
The composition (g ◦ f )(x) is:
I
g(f (x)) = g(x2 ) = x2 + 1.
Similarly, the reverse composition (f ◦ g)(x) is:
f (g(x)) = f (x + 1) = (x + 1)2 = x2 + 2x + 1.
Clearly, g ◦ f , f ◦ g, illustrating the **non-commutativity** of function composition.
Let f (x) = x2 and g(x) = cos x, both of which are even functions.
g(f (x)) = cos(f (x)) = cos(x2 ).
Since cos(x2 ) = cos((−x)2 ), we conclude that g ◦ f is also even.
A
Example- Case 3: f is even and g is odd
Let f (x) = x2 (even) and g(x) = sin x (odd). Then:
g(f (x)) = sin(x2 ).
Since sin(x2 ) = sin((−x)2 ), this shows that g ◦ f is even.
M
g(f (x)) = (x3 )2 = x6 .
Since x6 = (−x)6 , we conclude that g ◦ f is even.
I
2. Non-Commutativity
f ◦g , g ◦f (Composition is not necessarily commutative).
3. Associativity
(f ◦ g) ◦ h = f ◦ (g ◦ h).
A
If f : A → B is a bijection, and g : B → A is its inverse, then:
f ◦ g = IB , g ◦ f = IA ,
where IA and IB are the identity functions on A and B, respectively.
x−3
Example- Consider f (x) = 2x + 3. The inverse function is f −1 (x) = 2 . Then:
x−3
(f ◦ f −1 )(x) = 2 · + 3 = x.
M
2
This verifies that f ◦ f −1 is the identity function.
I
5. Composition of Bijections
If f : A → B and g : B → C are both bijections, then their composition g ◦ f : A → C is also
a bijection, and:
(g ◦ f )−1 = f −1 ◦ g −1 .
Inverse Function
1. Existence Condition: A function f has an inverse if and only if it is bijective (both one-
A
one and onto).
M
4. Double Inversion: If f and g are inverse functions, then:
(f −1 )−1 = f .
I
Example- Finding the inverse of a function
Consider f (x) = 2x + 3. To find its inverse, solve for x in terms of y:
y = 2x + 3.
Solving for x:
y −3
x= .
2
So, the inverse function is:
x−3
f −1 (x) = .
2
Example- Inverse of f (x) = x2 on different domains
The function f (x) = x2 is not one-one on R, so it does not have an inverse over the entire real
line. However, if we restrict its domain to x ≥ 0, the function is one-one, and its inverse is:
√
f −1 (x) = x.
CHAPTER 2. FUNCTIONS 24
Definition [Inverse Image of a Set]. Let f : A → B be a function, and let S ⊆ B. The inverse
image (also called the preimage) of S under f is defined as:
f −1 (S) = {x ∈ A | f (x) ∈ S}.
That is, f −1 (S) consists of all elements in A whose images under f belong to S.
The inverse image satisfies the following properties for any subsets S1 , S2 ⊆ B:
f −1 (S1 ∪ S2 ) = f −1 (S1 ) ∪ f −1 (S2 ),
A
Example- Consider the function f : R≥0 → R defined by f (x) = x2 . Let S = [1, 4]. Then the
inverse image of S is given by:
f −1 (S) = [1, 2] ∪ [−2, −1].
This means that any x in the interval [1, 2] ∪ [−2, −1] satisfies f (x) ∈ S.
M
Remark : The function f does not need to be one-one (injective) or onto (surjective) for the
inverse image to be defined. The inverse image is simply the set of all elements in the domain
that map to a given subset in the codomain.
I
Consider the function g : R → R defined by g(x) = x2 , which is not one-one. Let B = {4}. The
inverse image is:g −1 (B) = {−2, 2}.
Here, both x = −2 and x = 2 satisfy g(x) = 4, showing that the function is not injective, yet the
inverse image is well-defined.
Function of Union and Intersection
For any subsets T1 , T2 ⊆ A, the function f satisfies the following properties:
f (T1 ∪ T2 ) = f (T1 ) ∪ f (T2 ),
1. Constant Function
Definition. A function f : A → B is called a 3 y
constant function over A if:
f (x) = c, ∀x ∈ A, where c is a constant. 2
Domain: A
1
Range: {c}
Properties: The graph of a constant function is x
A
−3 −2 −1 1 2 3
a horizontal line and it is neither one-one (in-
jective) nor onto (surjective). y=c −1
2. Identity Function
M
f (x) = x, ∀x ∈ R. 2
Domain: R
x
I
Range: R −3 −2 −1 1 2 3
Properties: The graph is a straight line passing
through the origin; it is both one-one (injective) −2
and onto (surjective), and it is an odd function.
y=x
3. Modulus Function
Definition. The modulus function is defined 3 y
as:
2
x,
x ≥ 0,
f (x) = |x| =
−x, x < 0.
1
Domain: R
Range: [0, ∞) x
−3 −2 −1 1 2 3
Properties: It is an even function, although it is
neither injective nor surjective. y = |x| −1
CHAPTER 2. FUNCTIONS 26
A
teger points. y = ⌊x⌋
5. Signum Function
Definition: The signum function is defined as:
2 y
1, x > 0,
f (x) =
0, x = 0, 1
M
−1, x < 0.
x
Domain: R
−3 −2 −1 1 2 3
I
Range: {−1, 0, 1}
−1
Properties: The function is discontinuous at
x = 0 due to the abrupt change in value and it is
y = sgn(x) −2
an odd function.
Mathematical Induction is a proof technique used to establish the validity of statements in-
volving natural numbers. It is a fundamental method in mathematics that follows a structured
approach.
A
Principle of Mathematical Induction
1. 1 ∈ S.
2. If k ∈ S, then k + 1 ∈ S.
M
Then, S = N.
I
Proof. Assume S , N.
• Hence, S = N.
Principle of Mathematical Induction : Let n0 ∈ N, and let P (n) be a statement for n ≥ n0 . If:
1. P (n0 ) is true.
Example- Here are a few examples to understand the application of Mathematical Induction:
n(n + 1)
Sn = 1 + 2 + · · · + n =
2
A
Inductive Step : Assume that for some k ∈ N, the formula holds:
k(k + 1)
Sk = 1 + 2 + · · · + k = .
2
We must prove that it holds for k + 1:
Sk+1 = Sk + (k + 1).
Using the induction hypothesis:
M
k(k + 1)
Sk+1 = + (k + 1).
2
Simplifying:
k(k + 1) + 2(k + 1) (k + 1)(k + 2)
I
Sk+1 = = .
2 2
Thus, the formula holds for k + 1, completing the induction proof.
A
Thus,
11k+1 ≡ 3k+1 (mod 4), 7k+1 ≡ 3k+1 (mod 4).
Since 3n ≡ (−1)n (mod 4), we have:
11k+1 − 7k+1 ≡ (−1)k+1 − (−1)k+1 ≡ 0 (mod 4).
Hence, 11k+1 − 7k+1 is divisible by 4, completing the induction.
M
6. Geometric Sum Formula: The sum of a geometric series is given by:
1 − r n+1
1 + r + r2 + · · · + rn = , for r , 1.
I
1−r
7. Strong Induction Example: Using strong induction, we can prove inequalities such as:
2n ≥ (n + 1)! for sufficiently large n.