HOME/NOTES/CONCEPT

Functions for JEE: Domain, Range, Inverse and Equations

Ritesh Raj · 3 Nov 2026
Aa
41 min read21 sectionsConcept

A function is a rule that gives every input exactly one output. That single sentence is the whole chapter: the domain asks which inputs are allowed, the range asks which outputs actually occur, one-one and onto ask how inputs and outputs are paired, and the inverse, the composite, even and odd, periodic and functional equations all describe that pairing in different ways. JEE uses functions in almost every calculus question, so speed here pays everywhere.

This note follows the order in which JEE asks the chapter: the meaning of a function, domain, range, the standard functions and their graphs, transformations, one-one and onto, counting functions, composition, the inverse, even and odd functions, periodic functions and functional equations. Every worked example is a JEE Main 2025 or 2026 or JEE Advanced 2026 question unless it says otherwise, and every answer was re-derived from scratch.

What is a function

For sets AA and BB, the cartesian product A×BA\times B is the set of all ordered pairs (a,b)(a,b) with a∈Aa\in A, b∈Bb\in B. Any subset of A×BA\times B is a relation from AA to BB.

A relation ff from AA to BB is a function, written f:A→Bf:A\to B, when

  1. every element of AA has an image, and
  2. no element of AA has two images.

So in a function each input is used, and used once. Two inputs may share an output; that is allowed.

WordMeaning for f:A→Bf:A\to B
DomainAA, the set of allowed inputs
Co-domainBB, the set in which outputs lie
Rangef(A)={f(a):a∈A}f(A)=\{f(a):a\in A\}, the outputs that actually occur

Always f(A)⊆Bf(A)\subseteq B. The range can be smaller than the co-domain.

Vertical line test. A curve in the plane is the graph of a function of xx exactly when every vertical line meets it at most once.

Two graphs side by side: on the left a circle centred at the origin cut by a dashed vertical line that meets it at two marked points; on the right an upward parabola cut by a dashed vertical line that meets it at one marked point

Real valued functions. When the range lies in R\mathbb{R}, the function is real valued. For two such functions on a common domain,

(f±g)(x)=f(x)±g(x)(f\pm g)(x)=f(x)\pm g(x) (fg)(x)=f(x) g(x)(fg)(x)=f(x)\,g(x) (fg)(x)=f(x)g(x),g(x)≠0\left(\frac fg\right)(x)=\frac{f(x)}{g(x)},\quad g(x)\ne0

The domain of f±gf\pm g and fgfg is Df∩DgD_f\cap D_g; for fg\dfrac fg, remove also the zeros of gg.

Equal functions

ff and gg are equal only when they have the same domain and f(x)=g(x)f(x)=g(x) at every point of it. So x2x\dfrac{x^2}{x} and xx are not equal (the first is not defined at 00), and ln⁡x2\ln x^2 and 2ln⁡x2\ln x are not equal (the first is defined for all x≠0x\ne0, the second only for x>0x>0).

Example 1 (IITianForum). Let A={1,2,3}A=\{1,2,3\} and B={4,5,6}B=\{4,5,6\}. Which of these relations are functions from AA to BB? For each function, write its range.

R1={(1,4),(2,5),(3,4)}R_1=\{(1,4),(2,5),(3,4)\} R2={(1,4),(2,6)}R_2=\{(1,4),(2,6)\} R3={(1,4),(1,5),(2,6),(3,6)}R_3=\{(1,4),(1,5),(2,6),(3,6)\}
▸ SHOW SOLUTION

Step 1. Check each input

R1R_1: 1,2,31,2,3 each appear once as a first entry. Function.

R2R_2: 33 has no image. Not a function.

R3R_3: 11 has two images, 44 and 55. Not a function.

Step 2. Range of R₁

Outputs that occur: 44 and 55.

Answer: only R1R_1 is a function; its range is {4,5}\{4,5\}, a proper subset of the co-domain BB.

Domain

The domain of a formula is the set of all real xx for which every part of the formula gives a real number. Write one condition for each part, solve each, and intersect.

PartCondition
g(x)\sqrt{g(x)}g(x)≥0g(x)\ge0
1g(x)\dfrac{1}{g(x)}g(x)≠0g(x)\ne0
log⁡ag(x)\log_a g(x)g(x)>0g(x)>0
log⁡h(x)g(x)\log_{h(x)}g(x)g>0g>0, h>0h>0, h≠1h\ne1
sin⁡−1g\sin^{-1}g, cos⁡−1g\cos^{-1}g−1≤g(x)≤1-1\le g(x)\le1
sec⁡−1g\sec^{-1}g, cosec⁡−1g\operatorname{cosec}^{-1}g∣g(x)∣≥1\lvert g(x)\rvert\ge1
tan⁡x\tan x, sec⁡x\sec xx≠(2n+1)π2x\ne(2n+1)\dfrac\pi2
cot⁡x\cot x, cosec⁡x\operatorname{cosec}xx≠nπx\ne n\pi

Two facts settle most log conditions:

a>1: log⁡au>k  ⟺  u>aka>1:\ \log_a u>k\iff u>a^k 0<a<1: log⁡au>k  ⟺  0<u<ak0<a<1:\ \log_a u>k\iff 0<u<a^k

The second line reverses the inequality because log⁡a\log_a is decreasing when the base is less than 11.

Nested logs

For log⁡plog⁡qlog⁡r(u)\log_p\log_q\log_r(u) with all bases greater than 11, work from outside in: the outer log needs its argument >0>0, so log⁡qlog⁡ru>0\log_q\log_r u>0, so log⁡ru>1\log_r u>1, so u>ru>r. One clean inequality replaces three.

Example 2 (IITianForum). Find the domain of

f(x)=x−2+1log⁡10(5−x)f(x)=\sqrt{x-2}+\frac{1}{\log_{10}(5-x)}
▸ SHOW SOLUTION

Step 1. Root

x−2≥0⇒x≥2x-2\ge0\Rightarrow x\ge2

Step 2. Log in the denominator

5−x>05-x>0 gives x<5x<5. The log must not be zero: 5−x≠15-x\ne1, so x≠4x\ne4.

Step 3. Intersect

Answer: [2,4)∪(4,5)[2,4)\cup(4,5)

Example 3 (JEE Main 2026, 24 January Shift 1). If the domain of the function

f(x)=log⁡(10x2−17x+7)(18x2−11x+1)f(x)=\log_{(10x^2-17x+7)}(18x^2-11x+1)

is (−∞,a)∪(b,c)∪(d,∞)−{e}(-\infty,a)\cup(b,c)\cup(d,\infty)-\{e\}, then 90(a+b+c+d+e)90(a+b+c+d+e) equals

Tap an option to check your answer
(1)170170
(2)177177
(3)307307
(4)316316
▸ SHOW SOLUTION

Step 1. Argument positive

18x2−11x+1=(2x−1)(9x−1)>018x^2-11x+1=(2x-1)(9x-1)>0x<19 or x>12x<\tfrac19\ \text{or}\ x>\tfrac12

Step 2. Base positive

10x2−17x+7=(x−1)(10x−7)>010x^2-17x+7=(x-1)(10x-7)>0x<710 or x>1x<\tfrac7{10}\ \text{or}\ x>1

Step 3. Base not equal to 1

10x2−17x+6=(5x−6)(2x−1)≠010x^2-17x+6=(5x-6)(2x-1)\ne0

x=12x=\tfrac12 is already excluded by Step 1, so only x=65x=\tfrac65 is removed.

Step 4. Intersect

(−∞,19)∪(12,710)∪(1,∞)−{65}\left(-\infty,\tfrac19\right)\cup\left(\tfrac12,\tfrac7{10}\right)\cup(1,\infty)-\left\{\tfrac65\right\}

So a=19a=\tfrac19, b=12b=\tfrac12, c=710c=\tfrac7{10}, d=1d=1, e=65e=\tfrac65.

90(a+b+c+d+e)90(a+b+c+d+e)=10+45+63+90+108=10+45+63+90+108

Answer: 316316, option (4)

Example 4 (JEE Main 2026, 23 January Shift 1). Let the domain of the function f(x)=log⁡3log⁡5log⁡7(9x−x2−13)f(x)=\log_3\log_5\log_7(9x-x^2-13) be the interval (m,n)(m,n). Let the hyperbola x2a2−y2b2=1\dfrac{x^2}{a^2}-\dfrac{y^2}{b^2}=1 have eccentricity n3\dfrac n3 and length of latus rectum 8m3\dfrac{8m}{3}. Then b2−a2b^2-a^2 is equal to

Tap an option to check your answer
(1)55
(2)1111
(3)99
(4)77
▸ SHOW SOLUTION

Step 1. Outside in

log⁡3(⋅)\log_3(\cdot) needs log⁡5log⁡7u>0\log_5\log_7 u>0, so log⁡7u>1\log_7 u>1, so u>7u>7:

9x−x2−13>79x-x^2-13>7x2−9x+20<0⇒(x−4)(x−5)<0x^2-9x+20<0\Rightarrow(x-4)(x-5)<0

So m=4m=4, n=5n=5.

Step 2. Hyperbola

e2=259=1+b2a2⇒b2a2=169e^2=\frac{25}{9}=1+\frac{b^2}{a^2}\Rightarrow\frac{b^2}{a^2}=\frac{16}{9}2b2a=323⇒b2a=163\frac{2b^2}{a}=\frac{32}{3}\Rightarrow\frac{b^2}{a}=\frac{16}{3}

Divide: a=3a=3, then b2=16b^2=16.

Answer: b2−a2=7b^2-a^2=7, option (4)

Example 5 (JEE Main 2026, 22 January Shift 2). Let the domain of the function

f(x)=log⁡3log⁡5(7−log⁡2λ)f(x)=\log_3\log_5\bigl(7-\log_2\lambda\bigr) +sin⁡−1∣3x−717−x∣,\qquad+\sin^{-1}\left\lvert\frac{3x-7}{17-x}\right\rvert,

where λ=x2−10x+85\lambda=x^2-10x+85, be (α,β](\alpha,\beta]. Then α+β\alpha+\beta is equal to

Tap an option to check your answer
(1)1010
(2)1212
(3)99
(4)88
▸ SHOW SOLUTION

Step 1. The log part

λ=(x−5)2+60>0\lambda=(x-5)^2+60>0 always. The outer log needs log⁡5(7−log⁡2λ)>0\log_5(7-\log_2\lambda)>0:

7−log⁡2λ>1⇒λ<26=647-\log_2\lambda>1\Rightarrow\lambda<2^6=64x2−10x+21<0⇒x∈(3,7)x^2-10x+21<0\Rightarrow x\in(3,7)

Step 2. The inverse sine part

(3x−7)2≤(17−x)2(3x-7)^2\le(17-x)^28x2−8x−240≤08x^2-8x-240\le0(x−6)(x+5)≤0(x-6)(x+5)\le0

So x∈[−5,6]x\in[-5,6].

Step 3. Intersect

(3,7)∩[−5,6]=(3,6](3,7)\cap[-5,6]=(3,6], so α=3\alpha=3, β=6\beta=6.

Answer: 99, option (3)

Example 6 (JEE Main 2026, 2 April Shift 1). If the domain of the function

f(x)=log⁡0.6∣2x−5x2−4∣f(x)=\sqrt{\log_{0.6}\left\lvert\frac{2x-5}{x^2-4}\right\rvert}

is (−∞,a]∪{b}∪[c,d)∪(e,∞)(-\infty,a]\cup\{b\}\cup[c,d)\cup(e,\infty), then the value of a+b+c+d+ea+b+c+d+e is ______.

▸ SHOW SOLUTION

Step 1. Reduce to one inequality

The root needs the log ≥0\ge0. The base 0.60.6 is less than 11, so the inequality reverses:

0<∣2x−5x2−4∣≤10<\left\lvert\frac{2x-5}{x^2-4}\right\rvert\le1

So x≠±2x\ne\pm2 and x≠52x\ne\tfrac52.

Step 2. Lower half: ≥ −1

2x−5x2−4+1=(x+1)2−10(x−2)(x+2)≥0\frac{2x-5}{x^2-4}+1=\frac{(x+1)^2-10}{(x-2)(x+2)}\ge0x≤−1−10 or −2<x<2x\le-1-\sqrt{10}\ \text{or}\ -2<x<2or x≥−1+10\text{or}\ x\ge-1+\sqrt{10}

Step 3. Upper half: ≤ 1

1−2x−5x2−4=(x−1)2(x−2)(x+2)≥01-\frac{2x-5}{x^2-4}=\frac{(x-1)^2}{(x-2)(x+2)}\ge0x<−2, x=1, x>2x<-2,\ x=1,\ x>2

Step 4. Intersect, remove 5/2

(−∞,−1−10 ]∪{1}\left(-\infty,-1-\sqrt{10}\,\right]\cup\{1\}∪[−1+10,52)\cup\left[-1+\sqrt{10},\tfrac52\right)∪(52,∞)\cup\left(\tfrac52,\infty\right)

So a=−1−10a=-1-\sqrt{10}, b=1b=1, c=−1+10c=-1+\sqrt{10}, d=e=52d=e=\tfrac52.

Answer: a+b+c+d+e=4a+b+c+d+e=4

Example 7 (JEE Main 2026, 21 January Shift 1). If the domain of the function

f(x)=cos⁡−12x−511−3xf(x)=\cos^{-1}\frac{2x-5}{11-3x} +sin⁡−1(2x2−3x+1)\qquad+\sin^{-1}(2x^2-3x+1)

is the interval [α,β][\alpha,\beta], then α+2β\alpha+2\beta is equal to

Tap an option to check your answer
(1)11
(2)33
(3)55
(4)22
▸ SHOW SOLUTION

Step 1. Inverse sine

2x2−3x+1≥−12x^2-3x+1\ge-1 means 2x2−3x+2≥02x^2-3x+2\ge0, true for all xx (discriminant −7-7). And

2x2−3x+1≤1⇒x(2x−3)≤02x^2-3x+1\le1\Rightarrow x(2x-3)\le0

So x∈[0,32]x\in\left[0,\tfrac32\right].

Step 2. Inverse cosine

2x−511−3x+1=6−x11−3x≥0\frac{2x-5}{11-3x}+1=\frac{6-x}{11-3x}\ge02x−511−3x−1=5x−1611−3x≤0\frac{2x-5}{11-3x}-1=\frac{5x-16}{11-3x}\le0

Together: x≤165x\le\tfrac{16}{5} or x>113x>\tfrac{11}{3}.

Step 3. Intersect

[0,32]\left[0,\tfrac32\right] lies inside (−∞,165]\left(-\infty,\tfrac{16}5\right], so the domain is [0,32]\left[0,\tfrac32\right].

Answer: α+2β=0+3=3\alpha+2\beta=0+3=3, option (2)

Example 8 (JEE Main 2026, 22 January Shift 1). If the domain of

f(x)=sin⁡−15−x3+2x+1log⁡(10−x)f(x)=\sin^{-1}\frac{5-x}{3+2x}+\frac{1}{\log(10-x)}

is (−∞,α]∪[β,γ)−{δ}(-\infty,\alpha]\cup[\beta,\gamma)-\{\delta\}, then 6(α+β+γ+δ)6(\alpha+\beta+\gamma+\delta) is

Tap an option to check your answer
(1)7070
(2)6666
(3)6767
(4)6868
▸ SHOW SOLUTION

Step 1. Inverse sine

∣5−x∣≤∣3+2x∣\lvert5-x\rvert\le\lvert3+2x\rvert with x≠−32x\ne-\tfrac32. Square:

25−10x+x2≤4x2+12x+925-10x+x^2\le4x^2+12x+93x2+22x−16≥03x^2+22x-16\ge0(3x−2)(x+8)≥0(3x-2)(x+8)\ge0

So x≤−8x\le-8 or x≥23x\ge\tfrac23.

Step 2. Log in the denominator

10−x>010-x>0 and 10−x≠110-x\ne1: x<10x<10, x≠9x\ne9.

Step 3. Intersect

(−∞,−8]∪[23,10)−{9}(-\infty,-8]\cup\left[\tfrac23,10\right)-\{9\}6(−8+23+10+9)=6⋅3536\left(-8+\tfrac23+10+9\right)=6\cdot\frac{35}{3}

Answer: 7070, option (1)

Example 9 (JEE Main 2026, 24 January Shift 2). If the domain of the function

f(x)=sin⁡−11x2−2x−2f(x)=\sin^{-1}\frac{1}{x^2-2x-2}

is (−∞,α]∪[β,γ]∪[δ,∞)(-\infty,\alpha]\cup[\beta,\gamma]\cup[\delta,\infty), then α+β+γ+δ\alpha+\beta+\gamma+\delta is equal to

Tap an option to check your answer
(1)22
(2)44
(3)33
(4)55
▸ SHOW SOLUTION

Step 1. Use t

Let t=x2−2x−2=(x−1)2−3t=x^2-2x-2=(x-1)^2-3, t≠0t\ne0. The condition ∣1t∣≤1\left\lvert\dfrac1t\right\rvert\le1 is simply

∣t∣≥1\lvert t\rvert\ge1

Step 2. Two cases

t≥1t\ge1: (x−1)2≥4(x-1)^2\ge4, so x≤−1x\le-1 or x≥3x\ge3.

t≤−1t\le-1: (x−1)2≤2(x-1)^2\le2, so 1−2≤x≤1+21-\sqrt2\le x\le1+\sqrt2.

Step 3. Domain

(−∞,−1]∪[1−2,1+2]∪[3,∞)(-\infty,-1]\cup\left[1-\sqrt2,1+\sqrt2\right]\cup[3,\infty)

Answer: −1+(1−2)+(1+2)+3=4-1+(1-\sqrt2)+(1+\sqrt2)+3=4, option (2)

The reciprocal step in Example 9 is worth remembering: ∣1t∣≤1  ⟺  ∣t∣≥1\left\lvert\dfrac1t\right\rvert\le1\iff\lvert t\rvert\ge1. It turns a rational inequality into two quadratic ones.

Domain with the greatest integer function

[x][x] is the greatest integer not exceeding xx. On each interval n≤x<n+1n\le x<n+1 it is the constant nn, so a condition containing [x][x] is solved one interval at a time.

Example 10 (JEE Main 2026, 6 April Shift 1). Let [⋅][\cdot] denote the greatest integer function. If the domain of the function f(x)=sin⁡−1(x+[x]3)f(x)=\sin^{-1}\left(\dfrac{x+[x]}{3}\right) is [α,β)[\alpha,\beta), then α2+β2\alpha^2+\beta^2 is equal to

Tap an option to check your answer
(1)22
(2)55
(3)1010
(4)1313
▸ SHOW SOLUTION

Step 1. Condition

−3≤x+[x]≤3-3\le x+[x]\le3

Step 2. Interval by interval

On [n,n+1)[n,n+1), x+[x]=x+nx+[x]=x+n runs over [2n,2n+1)[2n,2n+1).

nnx+[x]x+[x]inside [−3,3][-3,3]?
−2-2[−4,−3)[-4,-3)no
−1-1[−2,−1)[-2,-1)yes
00[0,1)[0,1)yes
11[2,3)[2,3)yes
22[4,5)[4,5)no

Step 3. Domain

[−1,0)∪[0,1)∪[1,2)=[−1,2)[-1,0)\cup[0,1)\cup[1,2)=[-1,2), so α=−1\alpha=-1, β=2\beta=2.

Answer: α2+β2=5\alpha^2+\beta^2=5, option (2)

Example 11 (JEE Main 2026, 4 April Shift 1). Let [⋅][\cdot] denote the greatest integer function. If the domain of f(x)=cos⁡−1(4x+2[x]3)f(x)=\cos^{-1}\left(\dfrac{4x+2[x]}{3}\right) is [α,β][\alpha,\beta], then 12(α+β)12(\alpha+\beta) is equal to

Tap an option to check your answer
(1)66
(2)88
(3)99
(4)44
▸ SHOW SOLUTION

Step 1. Condition

−3≤4x+2[x]≤3-3\le4x+2[x]\le3−3−4x≤2[x]≤3−4x-3-4x\le2[x]\le3-4x

Step 2. Interval [0, 1)

[x]=0[x]=0: −3−4x≤0≤3−4x-3-4x\le0\le3-4x gives 0≤x≤340\le x\le\tfrac34.

Step 3. Interval [−1, 0)

[x]=−1[x]=-1: −3−4x≤−2-3-4x\le-2 gives x≥−14x\ge-\tfrac14; the other side holds for all x<0x<0. So −14≤x<0-\tfrac14\le x<0.

Step 4. Other intervals

For x≥1x\ge1, 4x+2[x]≥6>34x+2[x]\ge6>3. For x<−1x<-1, 4x+2[x]<−84x+2[x]<-8. Nothing more.

Step 5. Domain

[−14,0)∪[0,34]=[−14,34]\left[-\tfrac14,0\right)\cup\left[0,\tfrac34\right]=\left[-\tfrac14,\tfrac34\right].

Answer: 12(−14+34)=612\left(-\tfrac14+\tfrac34\right)=6, option (1)

The step graph y equals 2 times the greatest integer of x, drawn as horizontal segments with filled left ends and hollow right ends, together with two parallel falling lines y equals 3 minus 4x and y equals minus 3 minus 4x; the part of the x axis from minus one quarter to three quarters, where the steps lie between the two lines, is highlighted

The picture shows Example 11 at a glance: xx is in the domain exactly when the step 2[x]2[x] lies between the two falling lines.

Range

The range is the set of values f(x)f(x) actually takes. JEE uses six methods.

  1. Solve for xx. Put y=f(x)y=f(x), make xx the subject, and see which yy give a valid xx in the domain.
  2. Discriminant. If y=f(x)y=f(x) becomes a quadratic in xx, real xx needs discriminant ≥0\ge0.
  3. Substitution. Put t=t= a simpler piece (∣x∣\lvert x\rvert, cos⁡x\cos x, 2x2^x), find the range of tt, then the range of yy in terms of tt.
  4. Monotonicity. A function increasing on [a,b][a,b] has range [f(a),f(b)][f(a),f(b)].
  5. Standard bounds. −a2+b2≤asin⁡x+bcos⁡x≤a2+b2-\sqrt{a^2+b^2}\le a\sin x+b\cos x\le\sqrt{a^2+b^2}, and t+1t≥2t+\dfrac1t\ge2 for t>0t>0.
  6. Graph. Read the lowest and highest heights the curve reaches.
Two graphs side by side: on the left the hyperbola y equals 2x plus 3 over x minus 1 with dashed asymptotes x equals 1 and y equals 2, the curve never touching the horizontal asymptote; on the right the curve y equals x plus 1 over x with its two branches, the lower branch peaking at height minus 2 and the upper branch bottoming at height 2, and the horizontal band between minus 2 and 2 shaded as a gap the curve never enters

Example 12 (IITianForum). Find the range of f(x)=2x+3x−1f(x)=\dfrac{2x+3}{x-1}.

▸ SHOW SOLUTION

Step 1. Solve for x

y(x−1)=2x+3⇒x(y−2)=y+3y(x-1)=2x+3\Rightarrow x(y-2)=y+3x=y+3y−2x=\frac{y+3}{y-2}

Step 2. Which y work

y=2y=2 gives no xx. For y≠2y\ne2 the value of xx is never 11 (that would need y+3=y−2y+3=y-2).

Answer: R−{2}\mathbb{R}-\{2\}. The horizontal asymptote y=2y=2 is the missing value (left panel of the figure).

Example 13 (JEE Main 2025, 7 April Shift 2). If the range of the function f(x)=5−xx2−3x+2f(x)=\dfrac{5-x}{x^2-3x+2}, x≠1,2x\ne1,2, is (−∞,α]∪[β,∞)(-\infty,\alpha]\cup[\beta,\infty), then α2+β2\alpha^2+\beta^2 is equal to

Tap an option to check your answer
(1)190190
(2)192192
(3)188188
(4)194194
▸ SHOW SOLUTION

Step 1. Quadratic in x

yx2+(1−3y)x+(2y−5)=0yx^2+(1-3y)x+(2y-5)=0

y=0y=0 gives x=5x=5, allowed. For y≠0y\ne0, real xx needs

(1−3y)2−4y(2y−5)≥0(1-3y)^2-4y(2y-5)\ge0y2+14y+1≥0y^2+14y+1\ge0

Step 2. Excluded points

x=1x=1 would need −4=0-4=0 and x=2x=2 would need −3=0-3=0, so no root is lost.

Step 3. Range

Roots of y2+14y+1=0y^2+14y+1=0: y=−7±43y=-7\pm4\sqrt3. So α=−7−43\alpha=-7-4\sqrt3, β=−7+43\beta=-7+4\sqrt3.

α2+β2=2(49+48)\alpha^2+\beta^2=2(49+48)

Answer: 194194, option (4)

Common mistake with the discriminant method

After finding the yy values from D≥0D\ge0, check two things: the case where the x2x^2 coefficient is zero, and whether the xx you get is one of the points removed from the domain. Either can add or remove a value from the range.

Example 14 (IITianForum). Find the range of

f(x)=3∣x∣−22∣x∣+1f(x)=\frac{3\lvert x\rvert-2}{2\lvert x\rvert+1}
▸ SHOW SOLUTION

Step 1. Substitute t = |x|

tt takes every value in [0,∞)[0,\infty).

y=3t−22t+1=32−72(2t+1)y=\frac{3t-2}{2t+1}=\frac32-\frac{7}{2(2t+1)}

Step 2. Monotone in t

As tt grows, 72(2t+1)\dfrac{7}{2(2t+1)} falls, so yy rises. At t=0t=0, y=−2y=-2. As tt grows without bound, yy gets as close to 32\tfrac32 as we like but never equals it.

Answer: [−2,32)\left[-2,\tfrac32\right)

Example 15 (JEE Main 2026, 5 April Shift 1). The sum of all the integral values of pp such that the equation 3sin⁡2x+12cos⁡x−3=p3\sin^2x+12\cos x-3=p, x∈Rx\in\mathbb{R}, has at least one solution, is

Tap an option to check your answer
(1)−54-54
(2)−60-60
(3)−75-75
(4)−84-84
▸ SHOW SOLUTION

Step 1. Equation has a solution iff p is in the range

Put c=cos⁡x∈[−1,1]c=\cos x\in[-1,1]:

3(1−c2)+12c−3=12−3(c−2)23(1-c^2)+12c-3=12-3(c-2)^2

Step 2. Range

c−2∈[−3,−1]c-2\in[-3,-1], so (c−2)2∈[1,9](c-2)^2\in[1,9] and the range is [−15,9][-15,9].

Step 3. Sum of integers from −15 to 9

The terms −9-9 to 99 cancel, leaving −(10+11+12+13+14+15)-(10+11+12+13+14+15).

Answer: −75-75, option (3)

Example 16 (JEE Main 2026, 28 January Shift 1). In a G.P., if the product of the first three terms is 2727 and the set of all possible values for the sum of its first three terms is R−(a,b)\mathbb{R}-(a,b), then a2+b2a^2+b^2 is equal to ______.

▸ SHOW SOLUTION

Step 1. Terms

Take the terms Ar, A, Ar\dfrac Ar,\ A,\ Ar. Product A3=27A^3=27, so A=3A=3.

S=3(1+r+1r)S=3\left(1+r+\frac1r\right)

Step 2. Range of r + 1/r

For r>0r>0, r+1r≥2r+\dfrac1r\ge2 (AM ≥ GM). For r<0r<0, r+1r≤−2r+\dfrac1r\le-2. So r+1r∈(−∞,−2]∪[2,∞)r+\dfrac1r\in(-\infty,-2]\cup[2,\infty) (right panel of the figure).

Step 3. Range of S

S≥3(1+2)=9S\ge3(1+2)=9 or S≤3(1−2)=−3S\le3(1-2)=-3. So S∈R−(−3,9)S\in\mathbb{R}-(-3,9).

Answer: a2+b2=9+81=90a^2+b^2=9+81=90

Standard functions and their graphs

FunctionDomainRange
polynomial, odd degreeR\mathbb{R}R\mathbb{R}
∣x∣\lvert x\rvertR\mathbb{R}[0,∞)[0,\infty)
sgn⁡x\operatorname{sgn}xR\mathbb{R}{−1,0,1}\{-1,0,1\}
[x][x]R\mathbb{R}Z\mathbb{Z}
{x}=x−[x]\{x\}=x-[x]R\mathbb{R}[0,1)[0,1)
axa^x (a>0a>0, a≠1a\ne1)R\mathbb{R}(0,∞)(0,\infty)
log⁡ax\log_a x(0,∞)(0,\infty)R\mathbb{R}
sin⁡x\sin x, cos⁡x\cos xR\mathbb{R}[−1,1][-1,1]
tan⁡x\tan xx≠(2n+1)π2x\ne(2n+1)\frac\pi2R\mathbb{R}
cot⁡x\cot xx≠nπx\ne n\piR\mathbb{R}
sec⁡x\sec xx≠(2n+1)π2x\ne(2n+1)\frac\pi2(−∞,−1]∪[1,∞)(-\infty,-1]\cup[1,\infty)
cosec⁡x\operatorname{cosec}xx≠nπx\ne n\pi(−∞,−1]∪[1,∞)(-\infty,-1]\cup[1,\infty)

Modulus and signum

∣x∣=x (x≥0),∣x∣=−x (x<0)\lvert x\rvert=x\ (x\ge0),\qquad \lvert x\rvert=-x\ (x<0)

sgn⁡x\operatorname{sgn}x is 11 for x>0x>0, 00 at x=0x=0 and −1-1 for x<0x<0. For x≠0x\ne0, sgn⁡x=∣x∣x\operatorname{sgn}x=\dfrac{\lvert x\rvert}{x}.

Two graphs side by side: on the left the V shaped graph of y equals modulus of x with its corner at the origin; on the right the signum function, a horizontal ray at height 1 for positive x starting with a hollow dot, a filled dot at the origin, and a horizontal ray at height minus 1 for negative x ending with a hollow dot

Greatest integer and fractional part

[x][x] is the greatest integer ≤x\le x, and {x}=x−[x]\{x\}=x-[x]. Examples: [2.7]=2[2.7]=2, [−2.7]=−3[-2.7]=-3, {−2.7}=0.3\{-2.7\}=0.3.

Two graphs side by side: on the left the staircase y equals greatest integer of x, each step a horizontal segment with a filled dot at its left end and a hollow dot at its right end; on the right the sawtooth y equals fractional part of x, rising lines of slope 1 from filled dots on the x axis to hollow dots at height 1, under a dashed line at height 1
PropertyHolds for
x−1<[x]≤xx-1<[x]\le xall xx
[x+n]=[x]+n[x+n]=[x]+ninteger nn
[x]+[−x]=0[x]+[-x]=0x∈Zx\in\mathbb{Z}
[x]+[−x]=−1[x]+[-x]=-1x∉Zx\notin\mathbb{Z}
{x}+{−x}=0\{x\}+\{-x\}=0 or 11x∈Zx\in\mathbb{Z} or not
[x+y]=[x]+[y][x+y]=[x]+[y] or [x]+[y]+1[x]+[y]+1as {x}+{y}<1\{x\}+\{y\}<1 or ≥1\ge1

Exponential and logarithm

y=axy=a^x and y=log⁡axy=\log_a x are inverses of each other, so their graphs are mirror images in the line y=xy=x. For a>1a>1 both increase; for 0<a<10<a<1 both decrease.

The exponential curve y equals e to the x and the logarithm curve y equals log x drawn as mirror images in the dashed line y equals x; the exponential passes through the point 0 comma 1 and stays above the x axis, the logarithm passes through 1 comma 0 and stays to the right of the y axis

Example 17 (IITianForum). Let [⋅][\cdot] denote the greatest integer function. All values of xx for which the product

[x−13][x+23]\left[x-\tfrac13\right]\left[x+\tfrac23\right]

is a prime number form the set [x1,x2)∪[x3,x4)[x_1,x_2)\cup[x_3,x_4). Find x12+x22+x32+x42x_1^2+x_2^2+x_3^2+x_4^2.

▸ SHOW SOLUTION

Step 1. Consecutive integers

x+23=(x−13)+1x+\tfrac23=\left(x-\tfrac13\right)+1, so with n=[x−13]n=\left[x-\tfrac13\right] the product is n(n+1)n(n+1).

Step 2. When is n(n+1) prime

n(n+1)n(n+1) is a product of two consecutive integers, hence even. The only even prime is 22:

n(n+1)=2⇒n=1 or n=−2n(n+1)=2\Rightarrow n=1\ \text{or}\ n=-2

Step 3. Back to x

n=1n=1: 1≤x−13<21\le x-\tfrac13<2, so x∈[43,73)x\in\left[\tfrac43,\tfrac73\right).

n=−2n=-2: −2≤x−13<−1-2\le x-\tfrac13<-1, so x∈[−53,−23)x\in\left[-\tfrac53,-\tfrac23\right).

25+4+16+499=949\frac{25+4+16+49}{9}=\frac{94}{9}

Answer: 949\dfrac{94}{9}

Example 18 (JEE Main 2026, 28 January Shift 2). The sum of all the elements in the range of

f(x)=Sgn⁡(sin⁡x)+Sgn⁡(cos⁡x)f(x)=\operatorname{Sgn}(\sin x)+\operatorname{Sgn}(\cos x) +Sgn⁡(tan⁡x)+Sgn⁡(cot⁡x),\qquad+\operatorname{Sgn}(\tan x)+\operatorname{Sgn}(\cot x),

x≠nπ2x\ne\dfrac{n\pi}{2}, where Sgn⁡(t)=1\operatorname{Sgn}(t)=1 for t>0t>0 and −1-1 for t<0t<0, is

Tap an option to check your answer
(1)44
(2)22
(3)−2-2
(4)00
▸ SHOW SOLUTION

Step 1. Quadrant by quadrant

tan⁡x\tan x and cot⁡x\cot x always have the same sign, equal to the sign of sin⁡xcos⁡x\sin x\cos x.

Quadrantsin⁡\sincos⁡\costan⁡,cot⁡\tan,\cotff
I++++++44
II++−-−-−2-2
III−-−-++00
IV−-++−-−2-2

Step 2. Range

{4,−2,0}\{4,-2,0\}, sum 22.

Answer: option (2)

Example 19 (IITianForum). How many integers lie in the range of f(x)=sgn⁡(ln⁡(x2+x+1))f(x)=\operatorname{sgn}\bigl(\ln(x^2+x+1)\bigr)?

▸ SHOW SOLUTION

Step 1. Range of the inside

x2+x+1=(x+12)2+34≥34x^2+x+1=\left(x+\tfrac12\right)^2+\tfrac34\ge\tfrac34

So the quadratic takes every value in [34,∞)\left[\tfrac34,\infty\right).

Step 2. Sign of the log

ln⁡u<0\ln u<0 for 34≤u<1\tfrac34\le u<1, ln⁡u=0\ln u=0 at u=1u=1, ln⁡u>0\ln u>0 for u>1u>1. All three occur.

Answer: the range is {−1,0,1}\{-1,0,1\}, so 33 integers.

Transformations of graphs

Start from the graph of y=f(x)y=f(x). Each change in the formula changes the graph in a fixed way (k>0k>0, a>0a>0).

New functionEffect on the graph
f(x)+kf(x)+kup by kk
f(x−a)f(x-a)right by aa
−f(x)-f(x)reflect in the xx axis
f(−x)f(-x)reflect in the yy axis
kf(x)kf(x)stretch vertically by kk
f(kx)f(kx)compress horizontally by kk
∣f(x)∣\lvert f(x)\rvertparts below the xx axis flip up
f(∣x∣)f(\lvert x\rvert)keep x≥0x\ge0, mirror it to x<0x<0
Four small graphs in a row, each showing the dashed curve y equals root x and one transformed copy drawn solid: the first raised by one unit, the second shifted two units right, the third reflected in the x axis so it lies below, the fourth reflected in the y axis so it lies to the left
Counting solutions with a graph

The number of real solutions of f(x)=kf(x)=k is the number of points where the horizontal line y=ky=k meets the graph of ff. Transform the graph first, then slide the line.

Example 20 (IITianForum). Find the number of real solutions of

∣x2−4∣x∣+3∣=12\left\lvert x^2-4\lvert x\rvert+3\right\rvert=\tfrac12
▸ SHOW SOLUTION

Step 1. Use t = |x|

The left side is unchanged when xx is replaced by −x-x, so each positive solution tt gives two values x=±tx=\pm t. With t≥0t\ge0,

t2−4t+3=12 or t2−4t+3=−12t^2-4t+3=\tfrac12\ \text{or}\ t^2-4t+3=-\tfrac12

Step 2. First equation

t2−4t+52=0⇒t=2±32t^2-4t+\tfrac52=0\Rightarrow t=2\pm\sqrt{\tfrac32}

Both are positive (1.5<2\sqrt{1.5}<2).

Step 3. Second equation

t2−4t+72=0⇒t=2±12t^2-4t+\tfrac72=0\Rightarrow t=2\pm\sqrt{\tfrac12}

Both positive.

Step 4. Count

Four positive values of tt, each giving two values of xx.

Answer: 88 solutions

Three graphs side by side built from the parabola y equals x squared minus 4x plus 3: the first is y equals the modulus of that parabola, with the dip between 1 and 3 flipped above the axis; the second is y equals f of modulus x, a W shape symmetric about the y axis; the third is the modulus of f of modulus x, an M and W shape crossed by the dashed horizontal line y equals one half at eight marked points

One-one, onto and bijective

For f:A→Bf:A\to B:

TypeMeaning
one-one (injective)f(a1)=f(a2)⇒a1=a2f(a_1)=f(a_2)\Rightarrow a_1=a_2
many-onetwo different inputs share an output
onto (surjective)range == co-domain
intorange is a proper subset of the co-domain
bijectiveone-one and onto

Every function is exactly one of one-one or many-one, and exactly one of onto or into.

Four arrow diagrams side by side, each with a set A on the left and a set B on the right drawn as ovals with dots: the first shows three dots going to three different dots of a four dot set with one dot left unused, marked one-one into; the second shows two arrows meeting at the same dot and every dot of B used, marked many-one onto; the third shows a perfect pairing, marked one-one onto; the fourth shows two arrows meeting and a dot of B unused, marked many-one into

Tests for one-one

  1. Definition. Assume f(a)=f(b)f(a)=f(b) and show a=ba=b; or find two inputs with the same output.
  2. Horizontal line test. ff is one-one exactly when no horizontal line meets the graph twice.
  3. Monotonicity. If ff is strictly increasing or strictly decreasing on its domain, it is one-one. For a differentiable ff on an interval, f′(x)>0f'(x)>0 throughout (or f′<0f'<0 throughout) is enough; f′≥0f'\ge0 with equality only at isolated points also works.
  4. Quick rejections. An even function on a symmetric domain, a periodic function, and a continuous function with a turning point are all many-one.
Two graphs side by side: on the left the cubic y equals x cubed, cut by a dashed horizontal line that meets it once; on the right the parabola y equals x squared, cut by a dashed horizontal line that meets it at two marked points

Tests for onto

Find the range and compare it with the co-domain. A polynomial of odd degree from R\mathbb{R} to R\mathbb{R} is always onto; one of even degree never is.

Example 21 (JEE Main 2026, 28 January Shift 2). Given below are two statements.

Statement I: f:R→Rf:\mathbb{R}\to\mathbb{R}, f(x)=x1+∣x∣f(x)=\dfrac{x}{1+\lvert x\rvert} is one-one.

Statement II: f:R→Rf:\mathbb{R}\to\mathbb{R}, f(x)=x2+4x−30x2−8x+18f(x)=\dfrac{x^2+4x-30}{x^2-8x+18} is many-one.

Tap an option to check your answer
(1)Both false
(2)Both true
(3)I false, II true
(4)I true, II false
▸ SHOW SOLUTION

Step 1. Statement I

For x≥0x\ge0, f(x)=x1+x=1−11+xf(x)=\dfrac{x}{1+x}=1-\dfrac1{1+x}, increasing, with values in [0,1)[0,1). For x<0x<0, f(x)=x1−xf(x)=\dfrac{x}{1-x}, increasing, with values in (−1,0)(-1,0). The two pieces do not overlap, so ff is strictly increasing on R\mathbb{R}: one-one. True.

Step 2. Statement II

f(0)=−3018=−53f(0)=-\dfrac{30}{18}=-\dfrac53. Solve f(x)=−53f(x)=-\dfrac53 (the denominator is never zero):

3(x2+4x−30)=−5(x2−8x+18)3(x^2+4x-30)=-5(x^2-8x+18)8x2−28x=0⇒x=0, 728x^2-28x=0\Rightarrow x=0,\ \tfrac72

Two inputs, one output: many-one. True.

Answer: option (2)

Example 22 (JEE Main 2026, 6 April Shift 2). Let f:R→Rf:\mathbb{R}\to\mathbb{R} be defined as

f(x)=2x2−3x+23x2+x+3f(x)=\frac{2x^2-3x+2}{3x^2+x+3}

Then ff is

Tap an option to check your answer
(1)both one-one and onto
(2)one-one but not onto
(3)onto but not one-one
(4)neither one-one nor onto
▸ SHOW SOLUTION

Step 1. Not one-one

Both quadratics read the same from either end (2,−3,22,-3,2 and 3,1,33,1,3). So multiplying the numerator and denominator of f(1x)f\left(\dfrac1x\right) by x2x^2 gives f(x)f(x) back: f(1x)=f(x)f\left(\dfrac1x\right)=f(x) for x≠0x\ne0. For example,

f(2)=f(12)=417f(2)=f\left(\tfrac12\right)=\frac{4}{17}

Step 2. Range

(3y−2)x2+(y+3)x+(3y−2)=0(3y-2)x^2+(y+3)x+(3y-2)=0

Real xx needs (y+3)2−4(3y−2)2≥0(y+3)^2-4(3y-2)^2\ge0:

(7y−1)(5y−7)≤0⇒17≤y≤75(7y-1)(5y-7)\le0\Rightarrow\tfrac17\le y\le\tfrac75

The range is bounded, not R\mathbb{R}: not onto.

Answer: option (4)

Example 23 (JEE Main 2025, 24 January Shift 2). The function f:(−∞,∞)→(−∞,1)f:(-\infty,\infty)\to(-\infty,1), defined by f(x)=2x−2−x2x+2−xf(x)=\dfrac{2^x-2^{-x}}{2^x+2^{-x}}, is

Tap an option to check your answer
(1)one-one but not onto
(2)onto but not one-one
(3)both one-one and onto
(4)neither one-one nor onto
▸ SHOW SOLUTION

Step 1. Simplify

Multiply above and below by 2x2^x:

f(x)=4x−14x+1=1−24x+1f(x)=\frac{4^x-1}{4^x+1}=1-\frac{2}{4^x+1}

Step 2. One-one

4x4^x increases, so 24x+1\dfrac{2}{4^x+1} decreases and ff increases strictly. One-one.

Step 3. Range

4x4^x takes all values in (0,∞)(0,\infty), so 24x+1\dfrac{2}{4^x+1} takes all values in (0,2)(0,2) and ff takes all values in (−1,1)(-1,1). The co-domain (−∞,1)(-\infty,1) is larger: not onto.

Answer: option (1)

Example 24 (JEE Main 2025, 28 January Shift 2). Let f:[0,3]→Af:[0,3]\to A be defined by f(x)=2x3−15x2+36x+7f(x)=2x^3-15x^2+36x+7 and g:[0,∞)→Bg:[0,\infty)\to B be defined by g(x)=x2025x2025+1g(x)=\dfrac{x^{2025}}{x^{2025}+1}. If both the functions are onto and S={x∈Z:x∈A or x∈B}S=\{x\in\mathbb{Z}:x\in A\ \text{or}\ x\in B\}, then n(S)n(S) is equal to

Tap an option to check your answer
(1)3030
(2)3636
(3)2929
(4)3131
▸ SHOW SOLUTION

Step 1. Onto means A is the range of f

f′(x)=6(x−2)(x−3)f'(x)=6(x-2)(x-3)

ff increases on [0,2][0,2] and decreases on [2,3][2,3].

f(0)=7,f(2)=35,f(3)=34f(0)=7,\quad f(2)=35,\quad f(3)=34

So A=[7,35]A=[7,35].

Step 2. Range of g

g(x)=1−1x2025+1g(x)=1-\dfrac{1}{x^{2025}+1} increases from 00 towards 11, so B=[0,1)B=[0,1).

Step 3. Integers

From BB: only 00. From AA: 7,8,…,357,8,\dots,35, that is 2929 integers.

Answer: n(S)=30n(S)=30, option (1)

Example 25 (IITianForum). Let f:R→Rf:\mathbb{R}\to\mathbb{R} satisfy x+2∣f(x)∣=3f(x)x+2\lvert f(x)\rvert=3f(x) for every real xx. Show that ff is one-one and onto.

▸ SHOW SOLUTION

Step 1. Case f(x) ≥ 0

x+2f(x)=3f(x)x+2f(x)=3f(x) gives f(x)=xf(x)=x. This needs x≥0x\ge0.

Step 2. Case f(x) < 0

x−2f(x)=3f(x)x-2f(x)=3f(x) gives f(x)=x5f(x)=\dfrac x5. This needs x<0x<0.

Step 3. The function

f(x)=x (x≥0),f(x)=x5 (x<0)f(x)=x\ (x\ge0),\qquad f(x)=\frac x5\ (x<0)

For each xx exactly one case applies, so ff is well defined.

Step 4. Bijective

Both pieces increase, and the left piece takes all negative values while the right piece takes all values ≥0\ge0. So ff is strictly increasing with range R\mathbb{R}.

Answer: ff is one-one and onto.

Example 26 (IITianForum). If f:R→Rf:\mathbb{R}\to\mathbb{R},

f(x)=x3−(k−1)x2+(k+5)x−7f(x)=x^3-(k-1)x^2+(k+5)x-7

is a bijection, find the sum of all integral values of kk.

▸ SHOW SOLUTION

Step 1. Onto is automatic

A cubic from R\mathbb{R} to R\mathbb{R} takes every real value. So bijective means one-one, which for a cubic means f′(x)≥0f'(x)\ge0 for all xx.

Step 2. Derivative

f′(x)=3x2−2(k−1)x+(k+5)f'(x)=3x^2-2(k-1)x+(k+5)

This is never negative when its discriminant is ≤0\le0:

4(k−1)2−12(k+5)≤04(k-1)^2-12(k+5)\le0k2−5k−14≤0⇒(k−7)(k+2)≤0k^2-5k-14\le0\Rightarrow(k-7)(k+2)\le0

Step 3. Integers

k=−2,−1,…,7k=-2,-1,\dots,7. Sum =25=25.

Answer: 2525. At k=−2k=-2 and k=7k=7, f′f' is zero at a single point only, so ff is still strictly increasing.

Counting functions

Let n(A)=mn(A)=m and n(B)=nn(B)=n.

Type of f:A→Bf:A\to BNumber
all functionsnmn^m
one-one (m≤nm\le n)n(n−1)⋯(n−m+1)n(n-1)\cdots(n-m+1)
bijections (m=nm=n)n!n!
constantnn
onto, n=2n=22m−22^m-2
onto, n=3n=33m−3⋅2m+33^m-3\cdot2^m+3
intoall minus onto

For general nn the onto count is inclusion-exclusion over the elements of BB that are missed:

∑r=0n(−1)r(nr)(n−r)m\sum_{r=0}^{n}(-1)^r\binom nr(n-r)^m
Distributions are functions

Putting mm different objects into nn different boxes is a function from objects to boxes. "No box empty" means onto. "At most one object per box" means one-one.

Example 27 (IITianForum). For sets with n(A)=3n(A)=3 and n(B)=6n(B)=6, the number of functions from AA to BB is xx, of which yy are one-one. Find x+yx+y.

▸ SHOW SOLUTION

Step 1. All functions

Each of the 33 elements has 66 choices: x=63=216x=6^3=216.

Step 2. One-one

y=6⋅5⋅4=120y=6\cdot5\cdot4=120.

Answer: x+y=336x+y=336

Example 28 (JEE Main 2026, 4 April Shift 1). The number of functions f:{1,2,3,4}→{a,b,c}f:\{1,2,3,4\}\to\{a,b,c\} which are not onto is

Tap an option to check your answer
(1)4848
(2)4545
(3)5151
(4)3535
▸ SHOW SOLUTION

Step 1. Total

34=813^4=81

Step 2. Onto

34−3⋅24+3⋅14=81−48+3=363^4-3\cdot2^4+3\cdot1^4=81-48+3=36

Answer: 81−36=4581-36=45, option (2)

Example 29 (JEE Main 2026, 8 April Shift 2). A person has three different bags and four different books. The number of ways in which he can put these books in the bags so that no bag is empty, is

Tap an option to check your answer
(1)1818
(2)3636
(3)3939
(4)7272
▸ SHOW SOLUTION

Step 1. It is an onto count

Each book goes to one bag: a function from 44 books to 33 bags. No bag empty: onto.

34−3⋅24+3=363^4-3\cdot2^4+3=36

Step 2. Check by grouping

Sizes must be 2,1,12,1,1: choose the pair, (42)=6\binom42=6 ways, then arrange three groups in three bags, 3!=63!=6 ways.

Answer: 3636, option (2)

Example 30 (JEE Main 2026, 23 January Shift 2). Consider two sets

A={x∈Z:∣∣x−3∣−3∣≤1},A=\{x\in\mathbb{Z}:\lvert\lvert x-3\rvert-3\rvert\le1\}, B={x∈R−{1,2}: h(x)=0},B=\{x\in\mathbb{R}-\{1,2\}:\ h(x)=0\}, h(x)=(x−2)(x−4)x−1ln⁡∣x−2∣.h(x)=\frac{(x-2)(x-4)}{x-1}\ln\lvert x-2\rvert.

Then the number of onto functions f:A→Bf:A\to B is

Tap an option to check your answer
(1)6262
(2)7979
(3)3232
(4)8181
▸ SHOW SOLUTION

Step 1. A

−1≤∣x−3∣−3≤1⇒2≤∣x−3∣≤4-1\le\lvert x-3\rvert-3\le1\Rightarrow2\le\lvert x-3\rvert\le4

So 5≤x≤75\le x\le7 or −1≤x≤1-1\le x\le1: A={−1,0,1,5,6,7}A=\{-1,0,1,5,6,7\}, six elements.

Step 2. B

The factor x−2x-2 is not zero (x≠2x\ne2). So x=4x=4 or ∣x−2∣=1\lvert x-2\rvert=1, giving x=3x=3 (and x=1x=1, excluded). B={3,4}B=\{3,4\}.

Step 3. Onto count

26−2=622^6-2=62

Answer: option (1)

Example 31 (JEE Main 2026, 5 April Shift 1). Let A={1,2,3,4,5,6}A=\{1,2,3,4,5,6\}. The number of one-one functions f:A→Af:A\to A such that f(1)≥3f(1)\ge3, f(3)≤4f(3)\le4 and f(2)+f(3)=5f(2)+f(3)=5, is ______.

▸ SHOW SOLUTION

Step 1. The pair (f(2), f(3))

Distinct values with sum 55 and f(3)≤4f(3)\le4: (1,4),(4,1),(2,3),(3,2)(1,4),(4,1),(2,3),(3,2). Four pairs.

Step 2. f(1)

f(1)∈{3,4,5,6}f(1)\in\{3,4,5,6\}, minus the values already used. Each pair above uses exactly one of 3,43,4 and none of 5,65,6, so f(1)f(1) has 33 choices every time.

Step 3. The rest

The remaining 33 values go to 4,5,64,5,6 in 3!=63!=6 ways.

Answer: 4×3×6=724\times3\times6=72

Example 32 (JEE Advanced 2026, Paper 2). Consider the sets A={1,2,3,4,5}A=\{1,2,3,4,5\} and B={1,2,3,4,5,6,7}B=\{1,2,3,4,5,6,7\}. Let SS be the set of all functions f:A→Bf:A\to B such that f(2)≠2f(2)\ne2 and f(4)≠4f(4)\ne4. Consider the set

T={f∈S: g(f(x))=2x for some g}T=\{f\in S:\ g(f(x))=2^x\ \text{for some } g\}

where g:B→Ng:B\to\mathbb{N} and the condition holds for all x∈Ax\in A. Then the number of elements in TT is ______.

▸ SHOW SOLUTION

Step 1. Such a g exists iff f is one-one

If f(x1)=f(x2)f(x_1)=f(x_2) then 2x1=g(f(x1))=g(f(x2))=2x22^{x_1}=g(f(x_1))=g(f(x_2))=2^{x_2}, so x1=x2x_1=x_2. Conversely, if ff is one-one, set g(f(x))=2xg(f(x))=2^x on the range of ff and give gg any natural value elsewhere.

Step 2. One-one functions

7⋅6⋅5⋅4⋅3=25207\cdot6\cdot5\cdot4\cdot3=2520

Step 3. Remove f(2) = 2 or f(4) = 4

f(2)=2f(2)=2: 6⋅5⋅4⋅3=3606\cdot5\cdot4\cdot3=360. Same for f(4)=4f(4)=4. Both: 5⋅4⋅3=605\cdot4\cdot3=60.

2520−360−360+602520-360-360+60

Answer: 18601860

Composite functions

For f:A→Bf:A\to B and g:B→Cg:B\to C, the composite g∘f:A→Cg\circ f:A\to C is

(g∘f)(x)=g(f(x))(g\circ f)(x)=g\bigl(f(x)\bigr)

First apply ff, then gg. For formulas, the domain of g∘fg\circ f is

{x∈Df: f(x)∈Dg}\{x\in D_f:\ f(x)\in D_g\}
PropertyStatement
order mattersg∘f≠f∘gg\circ f\ne f\circ g in general
associativeh∘(g∘f)=(h∘g)∘fh\circ(g\circ f)=(h\circ g)\circ f
one-oneff, gg one-one ⇒g∘f\Rightarrow g\circ f one-one
ontoff, gg onto ⇒g∘f\Rightarrow g\circ f onto
converse partsg∘fg\circ f one-one ⇒f\Rightarrow f one-one
g∘fg\circ f onto ⇒g\Rightarrow g onto
Piecewise composition

For f(f(x))f(f(x)) or g(f(x))g(f(x)) with piecewise formulas, split the xx axis where ff changes formula AND where f(x)f(x) crosses the break points of the outer function. Then use one formula on each piece.

Example 33 (IITianForum). Let

f(x)=x+1for x<1f(x)=x+1\quad\text{for } x<1 f(x)=2xfor x≥1f(x)=2x\quad\text{for } x\ge1

Find f(f(x))f(f(x)).

▸ SHOW SOLUTION

Step 1. Where f(x) crosses 1

For x<1x<1, f(x)=x+1f(x)=x+1, which is <1<1 when x<0x<0 and ≥1\ge1 when 0≤x<10\le x<1. For x≥1x\ge1, f(x)=2x≥2f(x)=2x\ge2.

Step 2. Piece x < 0

f(x)=x+1<1f(x)=x+1<1, so f(f(x))=(x+1)+1=x+2f(f(x))=(x+1)+1=x+2.

Step 3. Piece 0 ≤ x < 1

f(x)=x+1≥1f(x)=x+1\ge1, so f(f(x))=2(x+1)f(f(x))=2(x+1).

Step 4. Piece x ≥ 1

f(x)=2x≥1f(x)=2x\ge1, so f(f(x))=4xf(f(x))=4x.

Answer: f(f(x))=x+2f(f(x))=x+2 for x<0x<0, 2x+22x+2 for 0≤x<10\le x<1, 4x4x for x≥1x\ge1.

Two graphs side by side: on the left the piecewise function made of the line y equals x plus 1 for x less than 1 and the line y equals 2x for x at least 1, joining at the point 1 comma 2; on the right its composite with itself, made of three line pieces y equals x plus 2, y equals 2x plus 2 and y equals 4x, with a dashed guide at x equals 1; the formula also changes at x equals 0, on the y axis

Example 34 (JEE Main 2026, 28 January Shift 1). If g(x)=3x2+2x−3g(x)=3x^2+2x-3, f(0)=−3f(0)=-3 and 4g(f(x))=3x2−32x+724g(f(x))=3x^2-32x+72, then f(g(2))f(g(2)) is equal to

Tap an option to check your answer
(1)256\dfrac{25}{6}
(2)−256-\dfrac{25}{6}
(3)72\dfrac72
(4)−72-\dfrac72
▸ SHOW SOLUTION

Step 1. Quadratic in f

Write ff for f(x)f(x):

12f2+8f−12=3x2−32x+7212f^2+8f-12=3x^2-32x+7212f2+8f−(3x2−32x+84)=012f^2+8f-(3x^2-32x+84)=0

Step 2. Solve

The discriminant is a perfect square:

64+48(3x2−32x+84)=(12x−64)264+48(3x^2-32x+84)=(12x-64)^2f=−8±(12x−64)24f=\frac{-8\pm(12x-64)}{24}

Step 3. Use f(0) = −3

The ++ sign gives f(0)=−3f(0)=-3; the −- sign gives 73\tfrac73. So

f(x)=x−62f(x)=\frac{x-6}{2}

Step 4. Value

g(2)=12+4−3=13g(2)=12+4-3=13, and f(13)=72f(13)=\tfrac72.

Answer: option (3)

Example 35 (JEE Main 2025, 23 January Shift 1). Let f(x)=log⁡exf(x)=\log_e x and

g(x)=x4−2x3+3x2−2x+22x2−2x+1g(x)=\frac{x^4-2x^3+3x^2-2x+2}{2x^2-2x+1}

Then the domain of f∘gf\circ g is

Tap an option to check your answer
(1)R\mathbb{R}
(2)(0,∞)(0,\infty)
(3)[0,∞)[0,\infty)
(4)[1,∞)[1,\infty)
▸ SHOW SOLUTION

Step 1. Condition

f∘gf\circ g needs g(x)g(x) defined and g(x)>0g(x)>0.

Step 2. Denominator

2x2−2x+12x^2-2x+1 has discriminant −4-4, so it is always positive.

Step 3. Numerator

x4−2x3+3x2−2x+2x^4-2x^3+3x^2-2x+2=(x2−x+1)2+1>0=(x^2-x+1)^2+1>0

So g(x)>0g(x)>0 for every real xx.

Answer: R\mathbb{R}, option (1)

Example 36 (JEE Main 2025, 4 April Shift 1). Let f,g:(1,∞)→Rf,g:(1,\infty)\to\mathbb{R} be defined as f(x)=2x+35x+2f(x)=\dfrac{2x+3}{5x+2} and g(x)=2−3x1−xg(x)=\dfrac{2-3x}{1-x}. If the range of f∘g:[2,4]→Rf\circ g:[2,4]\to\mathbb{R} is [α,β][\alpha,\beta], then 1β−α\dfrac{1}{\beta-\alpha} is equal to

Tap an option to check your answer
(1)6868
(2)2929
(3)22
(4)5656
▸ SHOW SOLUTION

Step 1. Composite

g(x)=3+1x−1>3g(x)=3+\dfrac{1}{x-1}>3 for x>1x>1, so f(g(x))f(g(x)) is defined.

f(g(x))=2(2−3x)+3(1−x)5(2−3x)+2(1−x)f(g(x))=\frac{2(2-3x)+3(1-x)}{5(2-3x)+2(1-x)}=9x−717x−12=\frac{9x-7}{17x-12}

Step 2. Monotone

9x−717x−12=917−1117(17x−12)\frac{9x-7}{17x-12}=\frac9{17}-\frac{11}{17(17x-12)}

For x∈[2,4]x\in[2,4], 17x−12>017x-12>0 and grows, so f∘gf\circ g increases.

Step 3. Range

(f∘g)(2)=1122=12,(f∘g)(4)=2956(f\circ g)(2)=\frac{11}{22}=\frac12,\quad (f\circ g)(4)=\frac{29}{56}β−α=2956−2856=156\beta-\alpha=\frac{29}{56}-\frac{28}{56}=\frac1{56}

Answer: 5656, option (4)

Inverse of a function

If f:A→Bf:A\to B is a bijection, the rule that sends each b∈Bb\in B back to the unique aa with f(a)=bf(a)=b is the inverse f−1:B→Af^{-1}:B\to A.

f−1(f(x))=xfor x∈Af^{-1}(f(x))=x\quad\text{for } x\in A f(f−1(y))=yfor y∈Bf(f^{-1}(y))=y\quad\text{for } y\in B

A function that is not one-one has no inverse; one that is not onto has an inverse only on its range.

Finding f−1f^{-1}. Put y=f(x)y=f(x), solve for xx in terms of yy, then rename yy as xx.

Graph. (a,b)(a,b) lies on y=f(x)y=f(x) exactly when (b,a)(b,a) lies on y=f−1(x)y=f^{-1}(x), so the two graphs are mirror images in the line y=xy=x.

Two graphs side by side: on the left the half parabola y equals x squared for x at least 0 and its mirror image y equals root x across the dashed line y equals x; on the right the curve y equals x minus 1 to the power 4 plus 1 for x at least 1 and its inverse curve, mirror images in the dashed line y equals x, meeting it at the two marked points 1 comma 1 and 2 comma 2
PropertyStatement
uniquea bijection has exactly one inverse
inverse of inverse(f−1)−1=f(f^{-1})^{-1}=f
composite(g∘f)−1=f−1∘g−1(g\circ f)^{-1}=f^{-1}\circ g^{-1}
self-inversef=f−1  ⟺  f(f(x))=xf=f^{-1}\iff f(f(x))=x
increasing fff(x)=f−1(x)  ⟺  f(x)=xf(x)=f^{-1}(x)\iff f(x)=x

The last line holds because if f(a)=bf(a)=b and f−1(a)=bf^{-1}(a)=b, then f(b)=af(b)=a; with ff increasing, a<ba<b would give b=f(a)<f(b)=ab=f(a)<f(b)=a, and a>ba>b fails the same way. So a=ba=b.

Only for increasing functions

For a decreasing function, f(x)=f−1(x)f(x)=f^{-1}(x) can have solutions off the line y=xy=x. For f(x)=−x3f(x)=-x^3, f−1(x)=−x1/3f^{-1}(x)=-x^{1/3}, and f=f−1f=f^{-1} at x=−1,0,1x=-1,0,1, while f(x)=xf(x)=x only at x=0x=0.

Example 37 (IITianForum). Let f:[2,∞)→[1,∞)f:[2,\infty)\to[1,\infty), f(x)=x2−4x+5f(x)=x^2-4x+5. Show that ff is invertible and find f−1f^{-1}.

▸ SHOW SOLUTION

Step 1. Bijective

f(x)=(x−2)2+1f(x)=(x-2)^2+1. On [2,∞)[2,\infty), x−2≥0x-2\ge0 grows, so ff increases from 11 without bound: one-one, and onto [1,∞)[1,\infty).

Step 2. Solve for x

y=(x−2)2+1⇒x−2=y−1y=(x-2)^2+1\Rightarrow x-2=\sqrt{y-1}

The positive root is taken since x≥2x\ge2.

Answer: f−1(x)=2+x−1f^{-1}(x)=2+\sqrt{x-1}, x≥1x\ge1

Example 38 (IITianForum). Find kk so that f(x)=2x+3x+kf(x)=\dfrac{2x+3}{x+k}, x≠−kx\ne-k, is its own inverse.

▸ SHOW SOLUTION

Step 1. Condition

f=f−1f=f^{-1} means f(f(x))=xf(f(x))=x for every xx in the domain.

f(f(x))=2⋅2x+3x+k+32x+3x+k+kf(f(x))=\frac{2\cdot\frac{2x+3}{x+k}+3}{\frac{2x+3}{x+k}+k}=7x+6+3k(2+k)x+3+k2=\frac{7x+6+3k}{(2+k)x+3+k^2}

Step 2. Compare

f(f(x))=xf(f(x))=x for all xx gives

(2+k)x2+(k2−4)x−(6+3k)=0(2+k)x^2+(k^2-4)x-(6+3k)=0

for all xx, so every coefficient is zero: k=−2k=-2 (and then k2−4=0k^2-4=0 also holds).

Answer: k=−2k=-2. In general ax+bcx+d\dfrac{ax+b}{cx+d} is self-inverse when a+d=0a+d=0; its graph is then symmetric about y=xy=x.

Example 39 (JEE Main 2026, 4 April Shift 2). For the function f:[1,∞)→[1,∞)f:[1,\infty)\to[1,\infty) defined by f(x)=(x−1)4+1f(x)=(x-1)^4+1, consider the two statements:

(I) The set S={x∈[1,∞):f(x)=f−1(x)}S=\{x\in[1,\infty):f(x)=f^{-1}(x)\} contains exactly two elements.

(II) The set S={x∈[1,∞):f(x)=f−1(x+1)}S=\{x\in[1,\infty):f(x)=f^{-1}(x+1)\} is empty.

Tap an option to check your answer
(1)only (I) is TRUE
(2)only (II) is TRUE
(3)both are TRUE
(4)neither is TRUE
▸ SHOW SOLUTION

Step 1. Statement I

ff is increasing on [1,∞)[1,\infty), so f(x)=f−1(x)  ⟺  f(x)=xf(x)=f^{-1}(x)\iff f(x)=x:

(x−1)4=x−1(x-1)^4=x-1(x−1)[(x−1)3−1]=0⇒x=1,2(x-1)\bigl[(x-1)^3-1\bigr]=0\Rightarrow x=1,2

Exactly two elements. True.

Step 2. The inverse

y−1=(x−1)4y-1=(x-1)^4 gives f−1(y)=1+(y−1)1/4f^{-1}(y)=1+(y-1)^{1/4}, so

f−1(x+1)=1+x1/4f^{-1}(x+1)=1+x^{1/4}

Step 3. Statement II

f(x)=f−1(x+1)f(x)=f^{-1}(x+1) becomes (x−1)4=x1/4(x-1)^4=x^{1/4}, that is

x=(x−1)16x=(x-1)^{16}

Let h(x)=(x−1)16−xh(x)=(x-1)^{16}-x. Then h(1)=−1<0h(1)=-1<0 and h(3)=216−3>0h(3)=2^{16}-3>0. hh is continuous, so it is zero somewhere in (1,3)(1,3) (near x≈2.05x\approx2.05). The set is not empty. False.

Answer: option (1)

Example 40 (JEE Main 2026, 6 April Shift 1). Let f:{1,2,3,4}→{1,e,e2,e3}f:\{1,2,3,4\}\to\{1,e,e^2,e^3\} and g:{1,e,e2,e3}→{1,12,13,14}g:\{1,e,e^2,e^3\}\to\left\{1,\tfrac12,\tfrac13,\tfrac14\right\} be two bijective functions such that ff is strictly decreasing and gg is strictly increasing. If

ϕ(x)=[f−1{g−1(12)}]x,\phi(x)=\left[f^{-1}\left\{g^{-1}\left(\tfrac12\right)\right\}\right]^x,

then the area of the region {(x,y):x2≤y≤ϕ(x), 0≤x≤1}\{(x,y):x^2\le y\le\phi(x),\ 0\le x\le1\} is

Tap an option to check your answer
(1)3−log⁡e23log⁡e2\dfrac{3-\log_e2}{3\log_e2}
(2)13log⁡e2\dfrac{1}{3\log_e2}
(3)3+log⁡e23+\log_e2
(4)3+log⁡e22+log⁡e3\dfrac{3+\log_e2}{2+\log_e3}
▸ SHOW SOLUTION

Step 1. g increasing

The smallest input goes to the smallest output:

g(1)=14, g(e)=13g(1)=\tfrac14,\ g(e)=\tfrac13g(e2)=12, g(e3)=1g(e^2)=\tfrac12,\ g(e^3)=1

So g−1(12)=e2g^{-1}\left(\tfrac12\right)=e^2.

Step 2. f decreasing

f(1)=e3, f(2)=e2f(1)=e^3,\ f(2)=e^2f(3)=e, f(4)=1f(3)=e,\ f(4)=1

So f−1(e2)=2f^{-1}(e^2)=2 and ϕ(x)=2x\phi(x)=2^x.

Step 3. Area

On [0,1][0,1], 2x≥1≥x22^x\ge1\ge x^2.

∫01(2x−x2) dx=1ln⁡2−13\int_0^1(2^x-x^2)\,dx=\frac{1}{\ln2}-\frac13=3−ln⁡23ln⁡2=\frac{3-\ln2}{3\ln2}

Answer: option (1)

Even and odd functions

Let the domain be symmetric about 00 (with xx, it contains −x-x).

even: f(−x)=f(x)\text{even: } f(-x)=f(x) odd: f(−x)=−f(x)\text{odd: } f(-x)=-f(x)

The graph of an even function is symmetric about the yy axis; the graph of an odd function is symmetric about the origin.

Two graphs side by side: on the left an even function, a W shaped curve symmetric about the y axis, with two marked points at the same height at x equals minus a and x equals a; on the right an odd function, an S shaped curve through the origin, with two marked points at x equals minus a and x equals a whose heights are equal and opposite
CombinationResult
even ±\pm eveneven
odd ±\pm oddodd
even ×\times even, odd ×\times oddeven
even ×\times oddodd
f(g(x))f(g(x)) with gg eveneven
odd ∘\circ oddodd
odd and defined at 00f(0)=0f(0)=0
both even and oddonly f≡0f\equiv0

Standard members: x2x^2, cos⁡x\cos x, ∣x∣\lvert x\rvert, ex+e−xe^x+e^{-x} are even; x3x^3, sin⁡x\sin x, tan⁡x\tan x, sgn⁡x\operatorname{sgn}x, ex−e−xe^x-e^{-x} are odd. Most functions are neither, but every function on a symmetric domain splits into an even part and an odd part:

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

An even function on a symmetric domain is never one-one (f(−a)=f(a)f(-a)=f(a)), so it has no inverse there.

Example 41 (IITianForum). Write exe^x as the sum of an even function and an odd function.

▸ SHOW SOLUTION

Step 1. Use the split

ex=ex+e−x2+ex−e−x2e^x=\frac{e^x+e^{-x}}{2}+\frac{e^x-e^{-x}}{2}

Step 2. Check

The first part is unchanged when x→−xx\to-x; the second changes sign.

Answer: even part ex+e−x2\dfrac{e^x+e^{-x}}{2}, odd part ex−e−x2\dfrac{e^x-e^{-x}}{2}

Example 42 (IITianForum). Which of the following are odd functions?

(A) x33∣x∣+cos⁡x\dfrac{x^3}{3^{\lvert x\rvert}+\cos x}

(B) x2ex2+1x^2e^{\sqrt{x^2+1}}

(C) 2x−12x+1(h(x)+h(−x))\dfrac{2^x-1}{2^x+1}\bigl(h(x)+h(-x)\bigr), for any function hh defined on R\mathbb{R}

(D) p(q(r(x)))p(q(r(x))), where pp, qq, rr are all odd

▸ SHOW SOLUTION

Step 1. (A)

x3x^3 is odd, 3∣x∣+cos⁡x3^{\lvert x\rvert}+\cos x is even (and positive). Odd over even: odd.

Step 2. (B)

Every factor is even. Even.

Step 3. (C)

2−x−12−x+1=1−2x1+2x\frac{2^{-x}-1}{2^{-x}+1}=\frac{1-2^x}{1+2^x}

So the first factor is odd. h(x)+h(−x)h(x)+h(-x) is even. Odd times even: odd.

Step 4. (D)

p(q(r(−x)))=p(q(−r(x)))=p(−q(r(x)))=−p(q(r(x)))p(q(r(-x)))=p(q(-r(x)))=p(-q(r(x)))=-p(q(r(x))). Odd.

Answer: (A), (C), (D)

Periodic functions

ff is periodic if there is a T>0T>0 with f(x+T)=f(x)f(x+T)=f(x) for every xx in the domain. The smallest such TT is the fundamental period (usually just "the period").

FunctionPeriod
sin⁡x\sin x, cos⁡x\cos x, sec⁡x\sec x, cosec⁡x\operatorname{cosec}x2π2\pi
tan⁡x\tan x, cot⁡x\cot xπ\pi
∣sin⁡x∣\lvert\sin x\rvert, ∣cos⁡x∣\lvert\cos x\rvert, sin⁡2x\sin^2x, cos⁡2x\cos^2xπ\pi
{x}=x−[x]\{x\}=x-[x]11
constant functionevery T>0T>0; no smallest

Rules.

  1. If ff has period TT, then f(ax+b)f(ax+b) has period T∣a∣\dfrac{T}{\lvert a\rvert}.
  2. If ff and gg have periods T1T_1 and T2T_2, then f+gf+g repeats after the LCM of T1T_1 and T2T_2. For fractions, LCM =LCM of numeratorsHCF of denominators=\dfrac{\text{LCM of numerators}}{\text{HCF of denominators}}.
  3. The LCM is a period but not always the smallest one. Check smaller values when the two parts interact, as in ∣sin⁡x∣+∣cos⁡x∣\lvert\sin x\rvert+\lvert\cos x\rvert or sin⁡4x+cos⁡4x\sin^4x+\cos^4x (period π2\tfrac\pi2 for both).

Example 43 (IITianForum). Find the period of sin⁡2x3+cos⁡x2\sin\dfrac{2x}{3}+\cos\dfrac x2.

▸ SHOW SOLUTION

Step 1. Each part

sin⁡2x3: 2π2/3=3π\sin\frac{2x}{3}:\ \frac{2\pi}{2/3}=3\picos⁡x2: 2π1/2=4π\cos\frac x2:\ \frac{2\pi}{1/2}=4\pi

Step 2. LCM

LCM of 3π3\pi and 4π4\pi is 12π12\pi. The smaller candidates fail: f(0)=1f(0)=1, but f(6π)=sin⁡4π+cos⁡3π=−1f(6\pi)=\sin4\pi+\cos3\pi=-1 and f(4π)=sin⁡8π3+1≠1f(4\pi)=\sin\tfrac{8\pi}{3}+1\ne1.

Answer: 12π12\pi

Example 44 (IITianForum). Find the period and the range of f(x)=∣sin⁡x∣+∣cos⁡x∣f(x)=\lvert\sin x\rvert+\lvert\cos x\rvert.

▸ SHOW SOLUTION

Step 1. π/2 is a period

f(x+π2)=∣cos⁡x∣+∣sin⁡x∣=f(x)f\left(x+\tfrac\pi2\right)=\lvert\cos x\rvert+\lvert\sin x\rvert=f(x)

Step 2. Nothing smaller

On [0,π2]\left[0,\tfrac\pi2\right],

f(x)=sin⁡x+cos⁡x=2sin⁡(x+π4)f(x)=\sin x+\cos x=\sqrt2\sin\left(x+\tfrac\pi4\right)

For 0<T<π20<T<\tfrac\pi2 this gives f(T)>1=f(0)f(T)>1=f(0), so no such TT is a period.

Step 3. Range

On one period 2sin⁡(x+π4)\sqrt2\sin\left(x+\tfrac\pi4\right) runs from 11 up to 2\sqrt2 and back.

Answer: period π2\dfrac\pi2, range [1,2]\left[1,\sqrt2\right]

The graph of y equals modulus of sin x plus modulus of cos x over several periods, a row of identical arches between heights 1 and root 2, with one arch from 0 to pi over 2 shaded to mark a single period and dashed horizontal guides at heights 1 and root 2

Example 45 (IITianForum). A function f:R→Rf:\mathbb{R}\to\mathbb{R} satisfies

f(x+1)+f(x−1)=3 f(x)f(x+1)+f(x-1)=\sqrt3\,f(x)

for all real xx, and f(4)=2f(4)=2. Find ∑r=110f(4+12r)\displaystyle\sum_{r=1}^{10}f(4+12r).

▸ SHOW SOLUTION

Step 1. Write the values one step apart

Fix xx and let an=f(x+n)a_n=f(x+n). The relation says an+1=3 an−an−1a_{n+1}=\sqrt3\,a_n-a_{n-1}. Start with a0=pa_0=p, a1=qa_1=q:

a2=3q−p,a3=2q−3pa_2=\sqrt3q-p,\quad a_3=2q-\sqrt3pa4=3q−2p,a5=q−3pa_4=\sqrt3q-2p,\quad a_5=q-\sqrt3pa6=3(q−3p)−(3q−2p)=−pa_6=\sqrt3(q-\sqrt3p)-(\sqrt3q-2p)=-p

Step 2. Period

So f(x+6)=−f(x)f(x+6)=-f(x) for every xx, and applying it twice,

f(x+12)=f(x)f(x+12)=f(x)

Step 3. Sum

Each term f(4+12r)=f(4)=2f(4+12r)=f(4)=2.

Answer: 10×2=2010\times2=20

Example 46 (IITianForum). A real function ff satisfies, for every real xx,

f(x+1)=2+u(x)3, wheref(x+1)=2+\sqrt[3]{u(x)},\ \text{where} u(x)=9−12f(x)+6f(x)2−f(x)3u(x)=9-12f(x)+6f(x)^2-f(x)^3

and f(1)=3f(1)=3. Find f(2026)+f(2027)f(2026)+f(2027).

▸ SHOW SOLUTION

Step 1. Shift by 2

Let g(x)=f(x)−2g(x)=f(x)-2. Expanding shows u(x)=1−(f(x)−2)3u(x)=1-(f(x)-2)^3, so

g(x+1)3=1−g(x)3g(x+1)^3=1-g(x)^3

Step 2. Period 2

Replace xx by x+1x+1: g(x+2)3=1−g(x+1)3=g(x)3g(x+2)^3=1-g(x+1)^3=g(x)^3, so g(x+2)=g(x)g(x+2)=g(x) and ff has period 22.

Step 3. Values

g(1)=1g(1)=1, so g(2)3=1−1=0g(2)^3=1-1=0 and f(2)=2f(2)=2.

f(2026)=f(2)=2f(2026)=f(2)=2f(2027)=f(1)=3f(2027)=f(1)=3

Answer: 55

Functional equations

A functional equation gives a relation that ff satisfies for all xx (and yy). The usual plan:

  1. Put special values: x=y=0x=y=0, x=y=1x=y=1, y=−xy=-x, y=1xy=\dfrac1x, to find f(0)f(0), f(1)f(1) and symmetry.
  2. When f(x)f(x) appears with f(1x)f\left(\dfrac1x\right) or f(a−x)f(a-x), replace xx by 1x\dfrac1x or a−xa-x and solve the two linear equations.
  3. When a form is given (polynomial of degree 22, say), substitute it and compare coefficients.
  4. Recognise the standard forms below. In JEE the function is given to be continuous, differentiable or a polynomial, which is what makes these forms the only answers.
EquationSolution
f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y)f(x)=kxf(x)=kx
f(x+y)=f(x)f(y)f(x+y)=f(x)f(y), f≢0f\not\equiv0f(x)=axf(x)=a^x, a>0a>0
f(xy)=f(x)+f(y)f(xy)=f(x)+f(y)f(x)=kln⁡xf(x)=k\ln x
f(xy)=f(x)f(y)f(xy)=f(x)f(y)f(x)=xnf(x)=x^n
f(x)f(1x)=f(x)+f(1x)f(x)f\left(\frac1x\right)=f(x)+f\left(\frac1x\right), polynomialf(x)=1±xnf(x)=1\pm x^n
f(x+y)+f(x−y)=2f(x)f(y)f(x+y)+f(x-y)=2f(x)f(y)f(x)=cos⁡kxf(x)=\cos kx type, even

Example 47 (JEE Main 2026, 22 January Shift 2). Let ff and gg be functions satisfying f(x+y)=f(x)f(y)f(x+y)=f(x)f(y) and g(x+y)=g(xy)g(x+y)=g(xy), with f(1)=7f(1)=7 and g(1)=1g(1)=1, for all x,y∈Nx,y\in\mathbb{N}. If

∑x=1nf(x)g(x)=19607,\sum_{x=1}^{n}\frac{f(x)}{g(x)}=19607,

then nn is equal to

Tap an option to check your answer
(1)77
(2)55
(3)66
(4)44
▸ SHOW SOLUTION

Step 1. f

y=1y=1: f(x+1)=7f(x)f(x+1)=7f(x), so f(x)=7xf(x)=7^x.

Step 2. g

y=1y=1: g(x+1)=g(x)g(x+1)=g(x), so gg is constant, g(x)=1g(x)=1.

Step 3. Sum

7+72+⋯+7n=7(7n−1)6=196077+7^2+\cdots+7^n=\frac{7(7^n-1)}{6}=196077n=1+6⋅196077=16807=757^n=1+\frac{6\cdot19607}{7}=16807=7^5

Answer: n=5n=5, option (2)

Example 48 (JEE Main 2026, 4 April Shift 2). Let for some α∈R\alpha\in\mathbb{R}, f:R→Rf:\mathbb{R}\to\mathbb{R} satisfy

f(x+y)=f(x)+2y2+y+αxyf(x+y)=f(x)+2y^2+y+\alpha xy

for all x,y∈Rx,y\in\mathbb{R}. If f(0)=−1f(0)=-1 and f(1)=2f(1)=2, then the value of ∑n=15(α+f(n))\displaystyle\sum_{n=1}^{5}\bigl(\alpha+f(n)\bigr) is

Tap an option to check your answer
(1)110110
(2)140140
(3)150150
(4)170170
▸ SHOW SOLUTION

Step 1. Put x = 0

f(y)=f(0)+2y2+y=2y2+y−1f(y)=f(0)+2y^2+y=2y^2+y-1

Step 2. Find α

Substitute f(x)=2x2+x−1f(x)=2x^2+x-1 back. The left side has 4xy4xy, the right side has αxy\alpha xy; all other terms match. So α=4\alpha=4. (Check: f(1)=2f(1)=2.)

Step 3. Sum

α+f(n)=2n2+n+3\alpha+f(n)=2n^2+n+3∑n=15(2n2+n+3)=2(55)+15+15\sum_{n=1}^{5}(2n^2+n+3)=2(55)+15+15

Answer: 140140, option (2)

Example 49 (JEE Main 2026, 24 January Shift 2). Let ff be a function such that

3f(x)+2f(m19x)=5x,x≠0,3f(x)+2f\left(\frac{m}{19x}\right)=5x,\quad x\ne0,

where m=∑i=19i2m=\displaystyle\sum_{i=1}^{9}i^2. Then f(5)−f(2)f(5)-f(2) is equal to

Tap an option to check your answer
(1)−9-9
(2)3636
(3)1818
(4)99
▸ SHOW SOLUTION

Step 1. The constant

m=9⋅10⋅196=285m=\dfrac{9\cdot10\cdot19}{6}=285, so m19=15\dfrac{m}{19}=15:

3f(x)+2f(15x)=5x(1)3f(x)+2f\left(\frac{15}{x}\right)=5x\qquad(1)

Step 2. Replace x by 15/x

3f(15x)+2f(x)=75x(2)3f\left(\frac{15}{x}\right)+2f(x)=\frac{75}{x}\qquad(2)

Step 3. Eliminate

3×(1)−2×(2)3\times(1)-2\times(2):

5f(x)=15x−150x⇒f(x)=3x−30x5f(x)=15x-\frac{150}{x}\Rightarrow f(x)=3x-\frac{30}{x}

Step 4. Value

f(5)=9f(5)=9, f(2)=−9f(2)=-9.

Answer: 1818, option (3)

Example 50 (JEE Main 2026, 5 April Shift 2). Let f:R→Rf:\mathbb{R}\to\mathbb{R} be a function such that f(x)+3f(π2−x)=sin⁡xf(x)+3f\left(\dfrac\pi2-x\right)=\sin x. Let the maximum value of ff be α\alpha. If the area of the region bounded by the curves g(x)=x2g(x)=x^2 and h(x)=βx3h(x)=\beta x^3, β>0\beta>0, is α2\alpha^2, then 30β330\beta^3 is equal to ______.

▸ SHOW SOLUTION

Step 1. Pair of equations

Replace xx by π2−x\dfrac\pi2-x:

f(π2−x)+3f(x)=cos⁡xf\left(\tfrac\pi2-x\right)+3f(x)=\cos x

Eliminate f(π2−x)f\left(\tfrac\pi2-x\right):

8f(x)=3cos⁡x−sin⁡x8f(x)=3\cos x-\sin x

Step 2. Maximum

3cos⁡x−sin⁡x3\cos x-\sin x has maximum 10\sqrt{10}, so α=108\alpha=\dfrac{\sqrt{10}}{8} and α2=532\alpha^2=\dfrac{5}{32}.

Step 3. Area

The curves meet at x=0x=0 and x=1βx=\dfrac1\beta.

∫01/β(x2−βx3) dx=112β3\int_0^{1/\beta}(x^2-\beta x^3)\,dx=\frac{1}{12\beta^3}112β3=532⇒β3=815\frac{1}{12\beta^3}=\frac{5}{32}\Rightarrow\beta^3=\frac{8}{15}

Answer: 30β3=1630\beta^3=16

Example 51 (JEE Main 2025, 28 January Shift 2). Let f:R−{0}→(−∞,1)f:\mathbb{R}-\{0\}\to(-\infty,1) be a polynomial of degree 22 satisfying

f(x)f(1x)=f(x)+f(1x)f(x)f\left(\tfrac1x\right)=f(x)+f\left(\tfrac1x\right)

If f(K)=−2Kf(K)=-2K, then the sum of squares of all possible values of KK is

Tap an option to check your answer
(1)11
(2)66
(3)77
(4)99
▸ SHOW SOLUTION

Step 1. Factor the equation

Bring every term to one side and add 11:

(f(x)−1)(f(1x)−1)=1\bigl(f(x)-1\bigr)\left(f\left(\tfrac1x\right)-1\right)=1

Step 2. The form of f

g(x)=f(x)−1g(x)=f(x)-1 is a polynomial with g(x)g(1x)=1g(x)g\left(\tfrac1x\right)=1; the only such polynomials are ±xn\pm x^n. Degree 22 gives f(x)=1±x2f(x)=1\pm x^2.

Step 3. Use the co-domain

1+x2≥11+x^2\ge1 is outside (−∞,1)(-\infty,1), so f(x)=1−x2f(x)=1-x^2.

Step 4. Solve f(K) = −2K

K2−2K−1=0K^2-2K-1=0

Sum of squares =(K1+K2)2−2K1K2=4+2=(K_1+K_2)^2-2K_1K_2=4+2.

Answer: 66, option (2)

Example 52 (IITianForum). A function f:R→Rf:\mathbb{R}\to\mathbb{R} with f(0)≠0f(0)\ne0 satisfies

f(x+y)+f(x−y)=2f(x)f(y)f(x+y)+f(x-y)=2f(x)f(y)

for all real x,yx,y, and f(1)=2f(1)=2. Show that ff is even and find f(2)f(2) and f(3)f(3).

▸ SHOW SOLUTION

Step 1. f(0)

x=y=0x=y=0: 2f(0)=2f(0)22f(0)=2f(0)^2. Since f(0)≠0f(0)\ne0, f(0)=1f(0)=1.

Step 2. Even

x=0x=0: f(y)+f(−y)=2f(y)f(y)+f(-y)=2f(y), so f(−y)=f(y)f(-y)=f(y).

Step 3. f(2)

x=y=1x=y=1: f(2)+f(0)=2f(1)2f(2)+f(0)=2f(1)^2.

f(2)=2⋅4−1=7f(2)=2\cdot4-1=7

Step 4. f(3)

x=2x=2, y=1y=1: f(3)+f(1)=2f(2)f(1)f(3)+f(1)=2f(2)f(1).

f(3)=2⋅7⋅2−2=26f(3)=2\cdot7\cdot2-2=26

Answer: ff is even, f(2)=7f(2)=7, f(3)=26f(3)=26. In general f(n+1)=2kf(n)−f(n−1)f(n+1)=2kf(n)-f(n-1) with k=f(1)k=f(1), which gives f(2)=2k2−1f(2)=2k^2-1.

Example 53 (IITianForum). Let f:(0,∞)→Rf:(0,\infty)\to\mathbb{R} with f(1)=1f(1)=1 satisfy, for all x,y>0x,y>0,

f(x)f(y)+f(5x)f(5y)=2f(xy)f(x)f(y)+f\left(\tfrac5x\right)f\left(\tfrac5y\right)=2f(xy)

Find f(2026)f(2026).

▸ SHOW SOLUTION

Step 1. x = y = 1

1+f(5)2=21+f(5)^2=2, so f(5)2=1f(5)^2=1.

Step 2. y = 1

f(x)+f(5x)f(5)=2f(x)f(x)+f\left(\tfrac5x\right)f(5)=2f(x)f(x)=f(5) f(5x)(1)f(x)=f(5)\,f\left(\tfrac5x\right)\qquad(1)

Step 3. y = 5/x

2f(x)f(5x)=2f(5)2f(x)f\left(\tfrac5x\right)=2f(5)f(x)f(5x)=f(5)(2)f(x)f\left(\tfrac5x\right)=f(5)\qquad(2)

Step 4. Square of f

Multiply (1) by f(x)f(x) and use (2): f(x)2=f(5)⋅f(5)=1f(x)^2=f(5)\cdot f(5)=1.

Step 5. Sign

Put x=y=tx=y=\sqrt t: f(t)2+f(5t)2=2f(t)f(\sqrt t)^2+f\left(\tfrac5{\sqrt t}\right)^2=2f(t), and both squares are 11, so f(t)=1f(t)=1 for every t>0t>0.

Answer: f(2026)=1f(2026)=1

Which method to use

A decision chart: from the question asked, arrows lead to eight situations, each paired with its method: domain, one condition per part then intersect; range, solve for x or use the discriminant or a substitution; one-one, test monotonicity or find two equal outputs; onto, compare range with co-domain; counting functions, use n to the power m, the falling product or inclusion-exclusion; composite, split where the inner function crosses the outer break points; inverse, solve y equals f of x for x and use y equals x for increasing f; functional equation, put special values or replace x by 1 over x then solve
GivenMethod
domainone condition per part, intersect
nested logsoutside in, one inequality
[x][x] inside a conditioninterval [n,n+1)[n,n+1) at a time
range of a rational functionsolve for xx, or discriminant ≥0\ge0
range with ∣x∣\lvert x\rvert, cos⁡x\cos x, 2x2^xsubstitute tt, use the range of tt
one-onemonotonic, or two equal outputs
ontorange == co-domain?
countingnmn^m, falling product, inclusion-exclusion
distributions with no empty boxonto count
composite of piecewise functionssplit where the inner value crosses outer breaks
inversesolve y=f(x)y=f(x) for xx
f(x)=f−1(x)f(x)=f^{-1}(x), ff increasingsolve f(x)=xf(x)=x
even or oddreplace xx by −x-x
period of a sumLCM, then check smaller values
f(x)f(x) with f(1x)f\left(\frac1x\right) or f(a−x)f(a-x)replace and solve two equations
f(x+y)f(x+y), f(xy)f(xy)x=y=0x=y=0, x=y=1x=y=1, standard forms

What JEE asks

Across the 2025 and 2026 papers the chapter appears in five forms, roughly in this order of frequency.

  1. Domain of a formula with logs, roots, inverse trigonometric parts or [x][x], answered as a sum of interval end points (Examples 3 to 11). This is the single most common functions question in JEE Main 2026.
  2. Counting functions: all, one-one, onto, not onto, with conditions (Examples 28 to 32).
  3. Functional equations of the substitution type, often followed by a sum or an area (Examples 47 to 51).
  4. One-one and onto decided from monotonicity and range (Examples 21 to 24).
  5. Range, composite and inverse, usually inside a larger question (Examples 13, 15, 34 to 40).

JEE Advanced 2026 tested the link between a composite and one-one functions (Example 32).

Quick recall

ResultStatement
Functionevery input, exactly one output
Rangef(A)⊆f(A)\subseteq co-domain
log⁡au>k\log_a u>k, 0<a<10<a<10<u<ak0<u<a^k
∣1t∣≤1\lvert\frac1t\rvert\le1∣t∣≥1\lvert t\rvert\ge1
x−1<[x]≤xx-1<[x]\le x{x}∈[0,1)\{x\}\in[0,1)
[x]+[−x][x]+[-x]00 at integers, −1-1 otherwise
asin⁡x+bcos⁡xa\sin x+b\cos xbetween ±a2+b2\pm\sqrt{a^2+b^2}
t+1tt+\frac1t≥2\ge2 for t>0t>0, ≤−2\le-2 for t<0t<0
f(x)=kf(x)=k solutionsmeets of y=ky=k with the graph
One-onestrictly monotonic suffices
Ontorange == co-domain
All functionsnmn^m
One-onen(n−1)⋯(n−m+1)n(n-1)\cdots(n-m+1)
Onto to 33 elements3m−3⋅2m+33^m-3\cdot2^m+3
Domain of g∘fg\circ fx∈Dfx\in D_f, f(x)∈Dgf(x)\in D_g
Inverse existsbijection
(g∘f)−1(g\circ f)^{-1}f−1∘g−1f^{-1}\circ g^{-1}
Self-inverse ax+bcx+d\frac{ax+b}{cx+d}a+d=0a+d=0
Even, oddf(−x)=f(x)f(-x)=f(x), f(−x)=−f(x)f(-x)=-f(x)
Period of f(ax+b)f(ax+b)T∣a∣\frac{T}{\lvert a\rvert}
∣sin⁡x∣+∣cos⁡x∣\lvert\sin x\rvert+\lvert\cos x\rvertperiod π2\frac\pi2
f(x+y)=f(x)f(y)f(x+y)=f(x)f(y)axa^x
f(xy)=f(x)+f(y)f(xy)=f(x)+f(y)kln⁡xk\ln x
Before you leave this chapter

Without a pen, answer these four: the domain of log⁡2log⁡3(x−1)\log_2\log_3(x-1), the number of onto functions from a 44 element set to a 22 element set, the period of ∣sin⁡2x∣\lvert\sin 2x\rvert, and f(x)f(x) if f(x)+2f(1−x)=xf(x)+2f(1-x)=x. If the answers (2,∞)(2,\infty), 1414, π2\tfrac\pi2 and 2−3x3\tfrac{2-3x}{3} come quickly, the chapter is yours.

Practise these methods on real exam questions in the doMath Functions chapter. Functions are the language of calculus: the Limits note and the Continuity and Differentiability note build directly on everything here.

[ SHARE ] WhatsApp
[ practice these chapters ]
Reinforce this post with live problems on doMath.
Basics & LogarithmsSets & Relations
← Back to all notes