WishWasTraining Academy
NDA & Naval Academy entrance exam school
โ† home
Chapter M5-1 ยท 1 of 8 in Differential Calculus ยท 14 min read

Functions: domain, range and graph

64 real NDA questions of this kind in the 19 papers of 2017 to 2026.

Try three questions free โ†“

Why this lesson matters. This chapter drew 25 questions in the seven papers from NDA II 2023 to NDA II 2026, and at least one in every paper. The exam asks four kinds of question: find the domain, find the range, find โ€‹f(x)โ€‹ from an equation such as โ€‹2f(x) + f(1 - x) = xโ€‹, and work with the modulus โ€‹|x|โ€‹ and the greatest integer โ€‹[x]โ€‹. Six real questions are solved in section 8.

What you will be able to do

  • Say what a function is, and find its domain with three simple rules.
  • Find the range of a function built from โ€‹x^2โ€‹, โ€‹\sin xโ€‹, โ€‹\cos xโ€‹ or โ€‹|x|โ€‹.
  • Use the modulus function and the greatest integer function, and describe their graphs.
  • Find โ€‹f(x)โ€‹ when it is given through an equation in โ€‹f(x)โ€‹ and โ€‹f\left(\frac{1}{x}\right)โ€‹.

Before you start you should know: sets and intervals (Chapter M1-1), relations (Chapter M1-2), and real numbers on the number line with the modulus โ€‹|x|โ€‹ (Chapter M1-3).

1. What a function is

A function โ€‹fโ€‹ is a rule that gives every allowed input โ€‹xโ€‹ exactly one output โ€‹f(x)โ€‹. If โ€‹f(x) = x^2 + 1โ€‹, then โ€‹f(3) = 10โ€‹ and โ€‹f(-3) = 10โ€‹. Two inputs may share one output. One input may never have two outputs.

  • The domain is the set of all allowed inputs.
  • The range is the set of all outputs that really occur.
  • In โ€‹f : A \to Bโ€‹, the set โ€‹Aโ€‹ is the domain and โ€‹Bโ€‹ is the codomain, the set in which the outputs must lie. The range is a part of the codomain.

For โ€‹f(x) = x^2 + 1โ€‹ the domain is all real numbers, written โ€‹\mathbb{R}โ€‹, and the range is โ€‹[1, \infty)โ€‹.

The graph of โ€‹fโ€‹ is the set of points โ€‹(x, f(x))โ€‹. A curve is the graph of a function only if every vertical line cuts it at most once. A circle is not the graph of a function, because a vertical line through its centre cuts it twice.

A vertical line cuts the parabola y = x squared once and cuts a circle twice

Two rules that meet. If a function is given by one formula on โ€‹0 \le x \le 2โ€‹ and another on โ€‹2 \le x \le 8โ€‹, the two formulas must give the same value at โ€‹x = 2โ€‹. If they do not, the input 2 has two outputs and the rule is not a function.

2. The domain: three rules

Look for three things in the formula.

The formula has Condition on โ€‹xโ€‹ Example
A fraction The denominator is not 0 โ€‹\dfrac{1}{x - 2}โ€‹: all real โ€‹xโ€‹ except 2
A square root (or any even root) The quantity under the root is โ€‹\ge 0โ€‹ โ€‹\sqrt{x - 3}โ€‹: โ€‹x \ge 3โ€‹, that is โ€‹[3, \infty)โ€‹
A logarithm The quantity whose log is taken is โ€‹> 0โ€‹. The base is positive and not 1 โ€‹\log(x - 1)โ€‹: โ€‹x > 1โ€‹, that is โ€‹(1, \infty)โ€‹

If a square root is in the denominator, the quantity under it must be strictly positive: โ€‹\dfrac{1}{\sqrt{x}}โ€‹ has domain โ€‹(0, \infty)โ€‹.

If the formula has more than one of these, all the conditions must hold together. Polynomials, โ€‹\sin xโ€‹, โ€‹\cos xโ€‹, โ€‹e^xโ€‹, โ€‹|x|โ€‹ and cube roots have no condition: their domain is โ€‹\mathbb{R}โ€‹.

3. The range

Start from a part whose range you know and build the function step by step.

Function Range
โ€‹x^2โ€‹ and โ€‹\lvert x \rvertโ€‹ โ€‹[0, \infty)โ€‹
โ€‹\sin xโ€‹ and โ€‹\cos xโ€‹ โ€‹[-1, 1]โ€‹
โ€‹\sin^2 xโ€‹ and โ€‹\cos^2 xโ€‹ โ€‹[0, 1]โ€‹
โ€‹e^xโ€‹ and โ€‹a^xโ€‹ (with โ€‹a > 0โ€‹, โ€‹a \ne 1โ€‹) โ€‹(0, \infty)โ€‹
โ€‹\log xโ€‹ โ€‹\mathbb{R}โ€‹

For example, take โ€‹f(x) = 3 + 2\sin xโ€‹. Since โ€‹\sin xโ€‹ goes from โ€‹-1โ€‹ to โ€‹1โ€‹, โ€‹2\sin xโ€‹ goes from โ€‹-2โ€‹ to โ€‹2โ€‹, and โ€‹3 + 2\sin xโ€‹ goes from โ€‹1โ€‹ to โ€‹5โ€‹. The range is โ€‹[1, 5]โ€‹.

The wave y = 3 + 2 sin x between the lines y = 1 and y = 5, with the range marked on the y-axis

For a quadratic, complete the square: โ€‹x^2 - 4x + 7 = (x - 2)^2 + 3โ€‹. A square is never negative, so the range is โ€‹[3, \infty)โ€‹.

The graphs of โ€‹e^xโ€‹ and โ€‹\ln xโ€‹ show their domain and range:

The graphs of y = e to the x, always above the x-axis, and y = ln x, only to the right of the y-axis

4. Four graphs to know

Draw each of these in your notebook. The pictures of three of them are below the table.

Function Rule Its graph Range
Identity โ€‹f(x) = xโ€‹ A straight line through the origin, rising at 45ยฐ โ€‹\mathbb{R}โ€‹
Square โ€‹f(x) = x^2โ€‹ A U-shaped curve with its lowest point at the origin โ€‹[0, \infty)โ€‹
Modulus โ€‹\lvert x \rvert = xโ€‹ if โ€‹x \ge 0โ€‹, and โ€‹-xโ€‹ if โ€‹x < 0โ€‹ A V with its point at the origin โ€‹[0, \infty)โ€‹
Greatest integer โ€‹[x]โ€‹ = the greatest integer that is not more than โ€‹xโ€‹ Flat steps of length 1. Each step includes its left end and not its right end All integers

The graphs of y = x squared and y = modulus of x, each with range from 0 upwards

Step graph of the greatest integer function from minus 2 to 3, with a filled dot at the left end of each step and an open circle at the right end

Learn the greatest integer function with numbers: โ€‹[2.7] = 2โ€‹, โ€‹[5] = 5โ€‹, โ€‹[0.999] = 0โ€‹, โ€‹[-0.3] = -1โ€‹ and โ€‹[-3.9] = -4โ€‹. For a negative number that is not an integer, go down to the next integer.

5. Even, odd and periodic functions

  • Even: โ€‹f(-x) = f(x)โ€‹ for every โ€‹xโ€‹. Examples: โ€‹x^2โ€‹, โ€‹\cos xโ€‹, โ€‹|x|โ€‹. The graph is its own mirror image in the โ€‹yโ€‹-axis.
  • Odd: โ€‹f(-x) = -f(x)โ€‹ for every โ€‹xโ€‹. Examples: โ€‹x^3โ€‹, โ€‹\sin xโ€‹, โ€‹\tan xโ€‹. The graph looks the same after a half turn about the origin.
  • Periodic: โ€‹f(x + T) = f(x)โ€‹ for every โ€‹xโ€‹. The smallest positive โ€‹Tโ€‹ is the period.

An even function y = x squared, the same on both sides of the y-axis, and an odd function y = x cubed, unchanged by a half turn about the origin

Function Period
โ€‹\sin xโ€‹, โ€‹\cos xโ€‹ โ€‹2\piโ€‹
โ€‹\tan xโ€‹ โ€‹\piโ€‹
โ€‹\sin^2 xโ€‹, โ€‹\cos^2 xโ€‹, โ€‹\lvert \sin x \rvertโ€‹ โ€‹\piโ€‹
โ€‹\sin kxโ€‹, โ€‹\cos kxโ€‹ โ€‹\dfrac{2\pi}{\lvert k \rvert}โ€‹

Adding a constant to a function does not change its period.

6. Equations that a function satisfies

Some questions do not give the formula for โ€‹fโ€‹. They give an equation that โ€‹fโ€‹ satisfies. Two methods answer almost all of them.

Method 1: swap. If the equation has โ€‹f(x)โ€‹ and โ€‹f\left(\frac{1}{x}\right)โ€‹, replace โ€‹xโ€‹ by โ€‹\frac{1}{x}โ€‹ everywhere. Now there are two equations in the two unknowns โ€‹f(x)โ€‹ and โ€‹f\left(\frac{1}{x}\right)โ€‹. Solve them like simultaneous equations. The same idea works for โ€‹f(x)โ€‹ with โ€‹f(1 - x)โ€‹, and for โ€‹f(x)โ€‹ with โ€‹f(-x)โ€‹.

Method 2: special values. If the equation holds for all โ€‹xโ€‹ and โ€‹yโ€‹, put simple values such as โ€‹y = 0โ€‹, โ€‹y = 1โ€‹ or โ€‹y = xโ€‹. For example, if โ€‹f(x + y) = f(x) + f(y)โ€‹ and โ€‹f(1) = 3โ€‹, then putting โ€‹x = y = 0โ€‹ gives โ€‹f(0) = 2f(0)โ€‹, so โ€‹f(0) = 0โ€‹. Putting โ€‹x = y = 1โ€‹ gives โ€‹f(2) = 6โ€‹, and then โ€‹f(3) = f(2) + f(1) = 9โ€‹.

7. Worked examples

Example 1. Find the domain of โ€‹f(x) = \dfrac{\sqrt{x + 3}}{x - 1}โ€‹.

The square root needs โ€‹x + 3 \ge 0โ€‹, so โ€‹x \ge -3โ€‹. The fraction needs โ€‹x \ne 1โ€‹. Both together: the domain is โ€‹[-3, 1) \cup (1, \infty)โ€‹.

Number line with the part from minus 3 onwards marked: a filled dot at minus 3 and an open circle at 1

Example 2. Find the range of โ€‹f(x) = 5 - 3\cos xโ€‹.

โ€‹\cos xโ€‹ goes from โ€‹-1โ€‹ to โ€‹1โ€‹. So โ€‹-3\cos xโ€‹ goes from โ€‹-3โ€‹ to โ€‹3โ€‹, and โ€‹5 - 3\cos xโ€‹ goes from โ€‹2โ€‹ to โ€‹8โ€‹. The range is โ€‹[2, 8]โ€‹.

Example 3. Let โ€‹f(x) = x - [x]โ€‹. Find โ€‹f(2.3)โ€‹ and โ€‹f(-2.3)โ€‹.

โ€‹[2.3] = 2โ€‹, so โ€‹f(2.3) = 2.3 - 2 = 0.3โ€‹.

โ€‹[-2.3] = -3โ€‹ (go down), so โ€‹f(-2.3) = -2.3 - (-3) = 0.7โ€‹.

The function โ€‹x - [x]โ€‹ is called the fractional part of โ€‹xโ€‹. Its value always lies in โ€‹[0, 1)โ€‹.

Example 4. If โ€‹f(x) + 2f\left(\dfrac{1}{x}\right) = 3xโ€‹ for all โ€‹x \ne 0โ€‹, find โ€‹f(x)โ€‹ and โ€‹f(2)โ€‹.

Replace โ€‹xโ€‹ by โ€‹\dfrac{1}{x}โ€‹: โ€‹\;f\left(\dfrac{1}{x}\right) + 2f(x) = \dfrac{3}{x}โ€‹.

Multiply this new equation by 2: โ€‹\;2f\left(\dfrac{1}{x}\right) + 4f(x) = \dfrac{6}{x}โ€‹.

Subtract the given equation: โ€‹\;3f(x) = \dfrac{6}{x} - 3xโ€‹, so

f(x) = \frac{2}{x} - x

Then โ€‹f(2) = 1 - 2 = -1โ€‹. Check: โ€‹f(2) + 2f\left(\frac{1}{2}\right) = -1 + 2 \times 3.5 = 6 = 3 \times 2โ€‹. Correct.

8. From the real papers

These six questions are from the Mathematics papers of NDA & NAVAC from 2023 to 2026. Try each for 75 seconds before reading the solution.

NDA II 2023, Q55. Let โ€‹f(x) = \sqrt{2 - x} + \sqrt{2 + x}โ€‹. What is the domain of the function?

(a) โ€‹(-2, 2)โ€‹โ€ƒโ€ƒ(b) โ€‹[-2, 2]โ€‹โ€ƒโ€ƒ(c) โ€‹\mathbb{R} - (-2, 2)โ€‹โ€ƒโ€ƒ(d) โ€‹\mathbb{R} - [-2, 2]โ€‹

Solution. The first root needs โ€‹2 - x \ge 0โ€‹, so โ€‹x \le 2โ€‹. The second needs โ€‹2 + x \ge 0โ€‹, so โ€‹x \ge -2โ€‹. Both together give โ€‹-2 \le x \le 2โ€‹, with the end points included. Answer (b).

NDA II 2023, Q49. A function is defined by โ€‹f(x) = \pi + \sin^2 xโ€‹. What is the range of the function?

(a) โ€‹[0, 1]โ€‹โ€ƒโ€ƒ(b) โ€‹[\pi, \pi + 1]โ€‹โ€ƒโ€ƒ(c) โ€‹[\pi - 1, \pi + 1]โ€‹โ€ƒโ€ƒ(d) โ€‹[\pi - 1, \pi - 1]โ€‹

Solution. โ€‹\sin^2 xโ€‹ takes every value from 0 to 1. Adding โ€‹\piโ€‹ moves this to the values from โ€‹\piโ€‹ to โ€‹\pi + 1โ€‹. Answer (b).

NDA I 2024, Q80. Which one of the following is correct in respect of โ€‹f(x) = \frac{1}{\sqrt{|x| - x}}โ€‹ and โ€‹g(x) = \frac{1}{\sqrt{x - |x|}}โ€‹?

(a) โ€‹f(x)โ€‹ has some domain and โ€‹g(x)โ€‹ has no domainโ€ƒโ€ƒ(b) โ€‹f(x)โ€‹ has no domain and โ€‹g(x)โ€‹ has some domainโ€ƒโ€ƒ(c) โ€‹f(x)โ€‹ and โ€‹g(x)โ€‹ have the same domainโ€ƒโ€ƒ(d) โ€‹f(x)โ€‹ and โ€‹g(x)โ€‹ do not have any domain

Solution. A root in the denominator needs a strictly positive quantity. For โ€‹fโ€‹: โ€‹|x| - x > 0โ€‹ is true exactly when โ€‹xโ€‹ is negative, so โ€‹fโ€‹ is defined for โ€‹x < 0โ€‹. For โ€‹gโ€‹: โ€‹x - |x| > 0โ€‹ is never true, because โ€‹|x| \ge xโ€‹ for every real โ€‹xโ€‹. So โ€‹gโ€‹ is defined nowhere. Answer (a).

NDA I 2025, Q81. Let the function โ€‹y = (1 - \cos x)^{-1}โ€‹, where โ€‹x \neq 2n\piโ€‹ and โ€‹nโ€‹ is an integer. What is the range of the function?

(a) โ€‹[0, \infty)โ€‹โ€ƒโ€ƒ(b) โ€‹[0.5, \infty)โ€‹โ€ƒโ€ƒ(c) โ€‹[1, \infty)โ€‹โ€ƒโ€ƒ(d) โ€‹(-\infty, 0.5]โ€‹

Solution. โ€‹\cos xโ€‹ lies from โ€‹-1โ€‹ to โ€‹1โ€‹, and the value โ€‹1โ€‹ is excluded. So the denominator โ€‹1 - \cos xโ€‹ takes every value in โ€‹(0, 2]โ€‹. The reciprocal of a number in โ€‹(0, 2]โ€‹ is โ€‹\frac{1}{2}โ€‹ or more, and it can be as large as we like. The range is โ€‹[0.5, \infty)โ€‹. Answer (b).

NDA I 2026, Q80. If โ€‹2f(x) + f(1 - x) = xโ€‹, then what is โ€‹f(x)โ€‹ equal to?

(a) โ€‹x - 1โ€‹โ€ƒโ€ƒ(b) โ€‹x - \left(\frac{1}{3}\right)โ€‹โ€ƒโ€ƒ(c) โ€‹2xโ€‹โ€ƒโ€ƒ(d) โ€‹2x - 1โ€‹

Solution. Replace โ€‹xโ€‹ by โ€‹1 - xโ€‹: โ€‹2f(1 - x) + f(x) = 1 - xโ€‹. Multiply the given equation by 2: โ€‹4f(x) + 2f(1 - x) = 2xโ€‹. Subtract: โ€‹3f(x) = 2x - (1 - x) = 3x - 1โ€‹, so โ€‹f(x) = x - \frac{1}{3}โ€‹. Answer (b).

NDA II 2026, Q81. What is the domain of the function โ€‹f(x) = \log_x eโ€‹?

(a) โ€‹(0, \infty)โ€‹โ€ƒโ€ƒ(b) โ€‹(0, \infty) - \{1\}โ€‹โ€ƒโ€ƒ(c) โ€‹(0, \infty) - \{e\}โ€‹โ€ƒโ€ƒ(d) โ€‹(0, \infty) - \{10\}โ€‹

Solution. Here โ€‹xโ€‹ is the base of the logarithm. A base must be positive and must not be 1. So the domain is all positive numbers except 1. Answer (b).

Notice that five of the six needed only the rules of sections 2 and 3.

9. Mistakes that cost marks

  1. Writing โ€‹\ge 0โ€‹ for a root in the denominator. For โ€‹\dfrac{1}{\sqrt{x - 1}}โ€‹ the condition is โ€‹x - 1 > 0โ€‹, not โ€‹x - 1 \ge 0โ€‹. The domain is โ€‹(1, \infty)โ€‹, and 1 is not in it.
  2. Taking โ€‹[-0.3]โ€‹ as 0. The greatest integer not more than โ€‹-0.3โ€‹ is โ€‹-1โ€‹. For negative numbers go down, not towards zero.
  3. Giving โ€‹\sin^2 xโ€‹ the range โ€‹[-1, 1]โ€‹. A square is never negative. The range of โ€‹\sin^2 xโ€‹ is โ€‹[0, 1]โ€‹.
  4. Mixing up range and codomain. For โ€‹f : \mathbb{R} \to \mathbb{R}โ€‹ with โ€‹f(x) = x^2โ€‹, the codomain is โ€‹\mathbb{R}โ€‹ but the range is only โ€‹[0, \infty)โ€‹.

10. Quick check

Do these without help. Answers are at the end.

  1. Find the domain of โ€‹f(x) = \sqrt{5 - x}โ€‹.
  2. Find the range of โ€‹f(x) = 2 + 3\sin xโ€‹.
  3. Find โ€‹[-2.5] + [2.5]โ€‹, where โ€‹[x]โ€‹ is the greatest integer function.
  4. Is โ€‹f(x) = x^3 + xโ€‹ even, odd or neither?
  5. If โ€‹2f(x) + f(-x) = x + 3โ€‹ for all real โ€‹xโ€‹, find โ€‹f(x)โ€‹ and โ€‹f(4)โ€‹.

11. Read and watch more, free

What Where Language
Textbook NCERT Class 11 Mathematics, Chapter 2 Relations and Functions ยท Hindi edition English, Hindi
Self-study notes NIOS Mathematics, Lesson 2 Relations and Functions-I ยท Hindi edition English, Hindi
Textbook, more detail OpenStax Calculus Volume 1, Chapter 1 Functions English
Video, the chapter for NDA NDA Vijay by Unacademy: Maths Free Milestone Batch (the class named Functions, about 3 hours 35 minutes) Hinglish
Video, the chapter for NDA Maths Jugad Se: NDA 2 2026 Maths Calculus (the class named Function, about 4 hours) Hinglish
Past NDA questions ExamSIDE: Functions English

The videos were chosen from their titles, length and views; they have not yet been watched by a teacher.

Answers to the quick check

  1. โ€‹5 - x \ge 0โ€‹, so โ€‹x \le 5โ€‹. The domain is โ€‹(-\infty, 5]โ€‹.
  2. โ€‹3\sin xโ€‹ goes from โ€‹-3โ€‹ to โ€‹3โ€‹, so the range is โ€‹[-1, 5]โ€‹.
  3. โ€‹[-2.5] = -3โ€‹ and โ€‹[2.5] = 2โ€‹. The sum is โ€‹-1โ€‹.
  4. Odd: โ€‹f(-x) = -x^3 - x = -f(x)โ€‹.
  5. Replace โ€‹xโ€‹ by โ€‹-xโ€‹: โ€‹2f(-x) + f(x) = -x + 3โ€‹. Multiply the given equation by 2 and subtract: โ€‹3f(x) = 2x + 6 - (-x + 3) = 3x + 3โ€‹. So โ€‹f(x) = x + 1โ€‹ and โ€‹f(4) = 5โ€‹.

Next chapter: Composite and inverse functions.

Free ยท no sign-up

Try three questions on this chapter

Exam-pattern questions from this chapter's drill. Pick an answer for each, then check.

  1. Question 1 of 3
    Let โ€‹[x]โ€‹ denote the greatest integer function. How many solutions does the equation โ€‹x^2 = [x] + 2โ€‹ have in the interval โ€‹[0, 3)โ€‹?
  2. Question 2 of 3
    Let โ€‹f(x) = \sin x + \cos xโ€‹ for all real โ€‹xโ€‹. Consider the following statements: I. The period of โ€‹fโ€‹ is โ€‹\piโ€‹. II. The range of โ€‹fโ€‹ is โ€‹[-1, 1]โ€‹. Which of the statements given above is/are correct?
  3. Question 3 of 3
    If โ€‹[x]โ€‹ denotes the greatest integer not exceeding โ€‹xโ€‹, what is the value of โ€‹[3.2] + [-3.2] + [-5]โ€‹?
Free sign-up

You have read the chapter. Now make it stick.

A free account adds the video lesson, a drill of ten questions on this chapter marked like the exam, the timed mock papers, a study plan to your exam date and your own record of what you have done. No fee, no card.

Past questions quoted are from the official UPSC paper named in the text; the explanations are WishWas's own and have been checked against the official key. The links under โ€œRead and watch moreโ€ go to free material on other sites; nothing is copied.