datarekha

Functions of One Variable

Domain, range, and the handful of standard function shapes you must recognise on sight — the foundation the whole Calculus block stands on.

5 min read Beginner GATE DA Lesson 34 of 122

What you'll learn

  • Domain (legal inputs) vs range (reachable outputs), and how to read them off a rule
  • The shapes you must know on sight: polynomials, eˣ, ln x, sin/cos, and |x|
  • Even vs odd functions, and what composition f(g(x)) does
  • ln x is undefined for x ≤ 0; |x| is continuous everywhere but has a corner at 0

Before you start

You can sketch from memory. Probably sin x too. That instinct — I know what this thing looks like — is the whole point of this lesson. A handful of curves show up on every page of calculus, and once you can picture them, half the work of limits, continuity, and derivatives is already done.

A function is just a rule that takes one number in and hands back one number out. The job here is to make the five everyday rules feel as familiar as the alphabet. These same shapes resurface the moment you do real ML — and ln x are the guts of the sigmoid and log-loss, and |x|-style corners are exactly where ReLU and L1 regularisation live — so the instinct pays off well past the exam.

Domain and range

Two questions pin down any function:

  • Domain — which inputs are legal. A square root cannot take a negative, a logarithm cannot take zero or below, a fraction cannot divide by zero. Everything else is fair game.
  • Range — which outputs are actually reached as the input sweeps over the domain.

For example f(x) = 1/x has domain “all real x except 0” and range “all real values except 0”. Reading these off the rule is the first reflex GATE expects.

The standard shapes you must know on sight

You will not be asked to memorise exotic curves. You will be expected to know these five instantly:

  • Polynomials (x, , , …) — defined for every real number; smooth, no breaks or corners. Even powers make a U/bowl; odd powers run from bottom-left to top-right.
  • Exponential always positive (never touches zero), passes through (0, 1), and grows extremely fast to the right while flattening toward 0 on the left.
  • Natural log ln x — the mirror of . Defined only for x > 0, crosses zero at x = 1, and dives to −∞ as x approaches 0 from the right.
  • sin x and cos x — wavy and periodic, forever bounded in [−1, 1]. They never escape that band no matter how large x gets.
  • Absolute value |x| — a V-shape: it equals x for x ≥ 0 and −x for x < 0. Continuous everywhere, but it has a sharp corner at x = 0.
eₓ(0,1)always > 0ln x(1,0)only x > 0|x|corner at 0
Three shapes worth memorising: eₓ never dips to zero, ln x lives only on the right half-line, and |x| bends sharply at the origin.

Even, odd, and composition

Two quick structural ideas GATE leans on:

  • Even function: f(−x) = f(x) — the graph is mirror-symmetric across the y-axis. Examples: , cos x, |x|.
  • Odd function: f(−x) = −f(x) — the graph has rotational symmetry about the origin. Examples: x, , sin x.
  • Composition f(g(x)) means “do g first, then feed the result into f”. The inner function’s output must be a legal input for the outer one — that is exactly what constrains the domain (see the worked example).

How GATE asks this

Functions rarely get a question to themselves. Instead this knowledge is embedded inside limit, continuity, and differentiability questions as a quiet first step: you must know that ln x needs a positive argument, that sin x can never exceed 1, or that |x| has a corner — before the real question even begins. GATE asks these as MCQs about a function’s domain, boundedness, or behavior.

Worked example

For f(x) = ln(x − 2), give the domain. Also state the range of sin x, and say where |x| fails to be smooth.

Domain of ln(x − 2). A logarithm needs a strictly positive argument, so we need x − 2 > 0, i.e. x > 2. The domain is all real numbers greater than 2 — the point x = 2 itself is excluded (there ln 0 is undefined).

Range of sin x. As x sweeps over all reals, sin x oscillates and reaches every value between −1 and 1 inclusive. The range is [−1, 1] — it is bounded.

Smoothness of |x|. The V-shape is continuous everywhere (you can draw it without lifting the pen), but at x = 0 it has a corner: the slope jumps from −1 to +1. That corner is why |x| is not differentiable at 0 — a fact the differentiability lesson will lean on directly.

Quick check

Quick check

0/7
Q1What is the domain boundary of f(x) = ln(x − 5)? Enter the smallest value of x that is NOT allowed.numerical answer — type a number
Q2Which of these functions are BOUNDED (their outputs stay within a fixed finite range)? (select all that apply)select all that apply
Q3Which of these functions are EVEN (satisfy f(−x) = f(x))? (select all that apply)select all that apply
Q4Which single function is ALWAYS strictly positive for every real input?
Q5Consider g(x) = sqrt(x). True or false in the GATE sense — pick the correct statements about g. (select all that apply)select all that apply
Q6At which single x-value does |x| fail to be differentiable (has a corner)?numerical answer — type a number
Q7Consider the composition h(x) = ln(cos x). Which is its largest domain interval around x = 0? (The inner output must be a legal input for ln.)

Practice this in an interview

All questions

Sign in to track your progress

Completed lessons, your XP, level, and streak save to your account — it's free and takes a few seconds.

Explore further

Related lessons

Skip to content