Skip to content
GATEiit

GATE DA · Calculus and Optimization

Functions of a single variable

Real functions of one variable: domain and range, one-one and onto maps, inverses, composition, even, odd and periodic functions, monotonicity and the standard functions used in data science.

Before you start

  • Inequalities and intervals

    Finding a domain means solving inequalities such as x2−5x+4≤0 and writing the answer as an interval.

  • Exponentials, logarithms and trigonometric functions

    Most GATE questions build functions from ex, ln⁡x, sin⁡x and cos⁡x and use their basic properties.

  • Sets, relations and functions →

    One-one, onto and bijective maps are defined there for general sets.

This topic comes before: Limit, continuity and differentiability

Concept notes

1. Domain, codomain and range

A function f:A→B assigns to each x in the domain A exactly one value f(x) in the codomain B. The range is the set of values actually taken: {f(x):x∈A}, a subset of B.

When only a formula is given, the domain is the largest set of reals where the formula makes sense. Collect the conditions:

Expression Condition
p(x)q(x) q(x)≠0
g(x) (even root) g(x)≥0
ln⁡g(x) g(x)>0
sin⁡−1g(x) −1≤g(x)≤1

The domain of a sum, product or quotient is the intersection of the individual domains.

To find the range, either solve y=f(x) for x and ask which y give a real x in the domain, or use bounds. Useful facts: asin⁡x+bcos⁡x has range [−a2+b2, a2+b2]; x+1x≥2 for x>0; ex>0 for all x; the sigmoid takes values in (0,1).

2. One-one, onto, inverse and composition

  • One-one (injective): f(x1)=f(x2)⇒x1=x2. Graphically, every horizontal line cuts the graph at most once. A strictly increasing or strictly decreasing function is one-one.
  • Onto (surjective): the range equals the codomain.
  • Bijective: both. Only a bijection has an inverse f−1, with f−1(f(x))=x.

To find f−1: write y=f(x), solve for x in terms of y, then swap the names. The graph of f−1 is the mirror image of the graph of f in the line y=x, and the domain and range swap.

Composition: (f∘g)(x)=f(g(x)). It is defined where g(x) lies in the domain of f. In general f∘g≠g∘f. The inverse of a composition reverses the order: (f∘g)−1=g−1∘f−1.

Example: f(x)=x2 on R is not one-one (f(−2)=f(2)), but on [0,∞) it is, with inverse x.

xyy = xy = eˣy = ln x(0, 1)(1, 0)
y = eˣ and its inverse y = ln x are mirror images in the line y = x; (0, 1) on one maps to (1, 0) on the other

3. Even, odd and periodic functions

  • Even: f(−x)=f(x); graph symmetric about the y-axis. Examples: x2, cos⁡x, ∣x∣.
  • Odd: f(−x)=−f(x); graph symmetric about the origin, and f(0)=0 if defined. Examples: x3, sin⁡x, x∣x∣, tan⁡x.
  • Most functions are neither (e.g. ex). Every f splits uniquely as even part f(x)+f(−x)2 plus odd part f(x)−f(−x)2.
Combine even, even odd, odd even, odd
Sum even odd neither (in general)
Product even even odd

On a symmetric interval, ∫−aaf=0 for odd f and =2∫0af for even f.

Periodic: f(x+T)=f(x) for all x; the smallest such T>0 is the fundamental period. sin⁡x, cos⁡x have period 2π; tan⁡x, ∣sin⁡x∣ have period π; sin⁡(kx) has period 2π/∣k∣. A sum of periodic functions with periods T1,T2 has period LCM(T1,T2) when the LCM exists (usually the fundamental period, but check).

4. Monotonic functions and the standard functions

f is increasing on an interval if x1<x2⇒f(x1)≤f(x2), strictly increasing if < holds. If f′(x)>0 throughout an interval, f is strictly increasing there; f′<0 gives strictly decreasing.

Functions that appear often in GATE DA:

Function Domain → range Notes
ex R→(0,∞) strictly increasing
ln⁡x (0,∞)→R inverse of ex
∣x∣ R→[0,∞) even, corner at 0
⌊x⌋ R→Z greatest integer ≤x; ⌊−2.5⌋=−3
sigmoid σ(x)=11+e−x R→(0,1) σ(−x)=1−σ(x), σ(0)=0.5
ReLU max⁡(0,x) R→[0,∞) not one-one

Graph transformations of y=f(x): f(x−a) shifts right by a; f(x)+b shifts up by b; f(kx) squeezes horizontally by k; −f(x) reflects in the x-axis; f(−x) reflects in the y-axis; ∣f(x)∣ reflects the negative part upward.

Formulas to remember

Composition
(f∘g)(x)=f(g(x))
Inverse of a composition
(f∘g)−1=g−1∘f−1
Even and odd parts
f(x)=f(x)+f(−x)2+f(x)−f(−x)2
Range of a sin x + b cos x
−a2+b2≤asin⁡x+bcos⁡x≤a2+b2
Period of sin(kx) or cos(kx)
T=2π∣k∣
Sigmoid symmetry
σ(−x)=1−σ(x),σ(x)=11+e−x

Common mistakes

  • Forgetting that ln⁡g(x) needs g(x)>0 strictly, while g(x) allows g(x)=0.
  • Taking ⌊−2.5⌋=−2; the floor of a negative non-integer moves away from zero, to −3.
  • Assuming the period of a sum is the larger period instead of the LCM of the periods.
  • Calling a function invertible when it is one-one but not onto the stated codomain; restrict the codomain to the range first.
  • Writing (f∘g)(x) as g(f(x)); the inner function g acts first.

Worked examples

Try each step yourself, then reveal the working.

Example 1: Domain of a square root of a logarithm

numerical

Find the domain of f(x)=ln⁡(5x−x24).

  1. Step 1: What does the square root need?

    Try it on paper first.

Example 2: Inverse of a rational function

numerical

Let f(x)=2x+3x−1 for x≠1. Find f−1(x) and f−1(4).

  1. Step 1: Write y = f(x) and solve for x.

    Try it on paper first.

Example 3: Fundamental period of a sum

numerical

Find the fundamental period of g(x)=sin⁡2x+cos⁡3x.

  1. Step 1: Find each term's period.

    Try it on paper first.

Example 4: Even, odd or neither

conceptual

Classify f1(x)=x3+sin⁡x, f2(x)=xsin⁡x, f3(x)=ex+x and f4(x)=ln⁡(x+x2+1).

  1. Step 1: Replace x by −x in f₁ and f₂.

    Try it on paper first.

Previous year questions

No official GATE DA question is tagged with this topic yet. The topic test below uses practice questions.

Topic test

8 questions: original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE DA syllabus; being checked by a reviewer. Updated 2026-11-21. Spotted a mistake? Use Report an issue on any question, or contact us.