Menu Close

Riemann integral: UPSC Maths Optional PYQ Solutions (2008–2026)

All 21 questions UPSC has asked on riemann integral in the Mathematics Optional (Paper II, Real Analysis) from 2008 to 2026, solved step by step – latest first.

Try them yourself first: the same questions, without solutions, are on our Real Analysis topic-wise PYQs page.

How we check these solutions

These are our own solutions, prepared with AI help. UPSC does not publish official answers. Every solution is checked a second way before it goes up, and says how:

  • ✓ Checked by computer the answer was worked out again independently with computer algebra (SymPy).
  • ✓ Proof checked step by step for “prove that” questions, every step was checked against the definitions.

Spotted a mistake or a neater method? Tell us in the comments below or through Report an error.

Jump to a question (year · question number):

2026 · 3b 2026 · 4b 2025 · 4b 2024 · 1c 2024 · 4b 2022 · 1c 2022 · 2a 2021 · 1c 2020 · 4b 2019 · 1c 2019 · 4c 2018 · 1b 2017 · 2a 2015 · 2b 2014 · 1b 2014 · 2b 2013 · 1c 2013 · 3d 2012 · 3b 2012 · 4b 2008 · 3c

Cover of the UPSC Prelims Topic-wise PYQ book with detailed explanations

From the Optional Province team

Preparing for Prelims too?

Our UPSC Prelims Topic-wise PYQ Book covers every Prelims question with detailed explanations, so you can see exactly where UPSC asks from. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

A function f is defined on [0,1] by f(x)={x2,when x is rationalx3,when x is irrational Evaluate lower integral ∫_01f and upper integral ∫¯01f. Does the integral ∫01f exist?

2026 · Paper II · Q3b · 20 marks

Solution

On [0,1][0,1] we have x3≤x2x^3\le x^2. Take any partition P={0=x0<x1<⋯<xn=1}P=\{0=x_0<x_1<\cdots<x_n=1\}. Each subinterval [xi−1,xi][x_{i-1},x_i] contains both rationals and irrationals (both are dense), and x2,x3x^2,x^3 are continuous and increasing, so Mi=sup[xi−1,xi]f=xi2,mi=inf[xi−1,xi]f=xi−13.M_i=\sup_{[x_{i-1},x_i]}f=x_i^2,\qquad m_i=\inf_{[x_{i-1},x_i]}f=x_{i-1}^3 . Hence U(P,f)=U(P,x2)U(P,f)=U(P,x^2) and L(P,f)=L(P,x3)L(P,f)=L(P,x^3): the upper sums of ff are those of the continuous function x2x^2, and the lower sums are those of x3x^3. Taking the infimum and supremum over all partitions, ∫01¯f=∫01x2dx=13,∫01_f=∫01x3dx=14.\overline{\int_0^1}f=\int_0^1x^2\,dx=\frac13,\qquad\underline{\int_0^1}f=\int_0^1x^3\,dx=\frac14 .

Since 14≠13\frac14\ne\frac13, the upper and lower integrals differ, so ∫01f\int_0^1f does not exist (ff is not Riemann integrable).

✓ Checked by computer We checked by computer: ∫01x2=13\int_0^1x^2=\frac13 and ∫01x3=14\int_0^1x^3=\frac14.

↑ Back to the question list

Prove that the improper integral ∫0∞11+x2sin2xdx is divergent.

2026 · Paper II · Q4b · 15 marks

Solution

The integrand is positive, so it is enough to find pieces of [0,∞)[0,\infty) whose integrals add up to ∞\infty.

Fix n≥1n\ge1 and look at Jn=[nπ,nπ+1(n+1)π]J_n=\left[n\pi,\ n\pi+\dfrac{1}{(n+1)\pi}\right]. On JnJ_n:

  • |sinx|=|sin(x−nπ)|≤x−nπ≤1(n+1)π|\sin x|=|\sin(x-n\pi)|\le x-n\pi\le\dfrac{1}{(n+1)\pi};
  • x≤nπ+1<(n+1)πx\le n\pi+1<(n+1)\pi.

So x2sin2x≤(n+1)2π2⋅1(n+1)2π2=1x^2\sin^2x\le(n+1)^2\pi^2\cdot\dfrac{1}{(n+1)^2\pi^2}=1, and the integrand is ≥12\ge\dfrac12 on JnJ_n. Therefore ∫Jndx1+x2sin2x≥12⋅1(n+1)π.\int_{J_n}\frac{dx}{1+x^2\sin^2x}\ \ge\ \frac12\cdot\frac{1}{(n+1)\pi}. The JnJ_n are disjoint, so for every NN, ∫0(N+1)πdx1+x2sin2x≥12π∑n=1N1n+1→∞,\int_0^{(N+1)\pi}\frac{dx}{1+x^2\sin^2x}\ \ge\ \frac{1}{2\pi}\sum_{n=1}^{N}\frac{1}{n+1}\ \longrightarrow\ \infty, as the harmonic series diverges. Hence the improper integral diverges. ◼\blacksquare

(Away from the zeros of sinx\sin x the integrand is small, but near each nπn\pi it rises to 1 on an interval of width about 1nπ\frac{1}{n\pi}, and these widths add up to infinity.)

✓ Proof checked step by step Proof checked step by step.

↑ Back to the question list

Prove that every continuous function is Riemann integrable.

2025 · Paper II · Q4b · 15 marks

Solution

Let ff be continuous on [a,b][a,b]. We use the Riemann criterion: ff is integrable iff for every ε>0\varepsilon>0 there is a partition PP with U(P,f)−L(P,f)<εU(P,f)-L(P,f)<\varepsilon.

  • A continuous function on a closed bounded interval is bounded and uniformly continuous. So, given ε>0\varepsilon>0, there is δ>0\delta>0 such that |x−y|<δ⇒|f(x)−f(y)|<εb−a.|x-y|<\delta\ \Longrightarrow\ |f(x)-f(y)|<\frac{\varepsilon}{b-a}.
  • Take any partition PP with all Δxi<δ\Delta x_i<\delta. On [xi−1,xi][x_{i-1},x_i], ff attains its maximum MiM_i and minimum mim_i at points less than δ\delta apart, so Mi−mi<εb−aM_i-m_i<\dfrac{\varepsilon}{b-a}.
  • Then U(P,f)−L(P,f)=∑(Mi−mi)Δxi<εb−a∑Δxi=ε.U(P,f)-L(P,f)=\sum(M_i-m_i)\Delta x_i<\frac{\varepsilon}{b-a}\sum\Delta x_i=\varepsilon .

By the Riemann criterion, ff is Riemann integrable on [a,b][a,b]. ◼\blacksquare

✓ Proof checked step by step Proof checked step by step.

↑ Back to the question list

Test the convergence of ∫02logx(2−x)dx.

2024 · Paper II · Q1c · 10 marks

Solution

The integrand logx2−x\dfrac{\log x}{\sqrt{2-x}} is unbounded at both ends: logx→−∞\log x\to-\infty as x→0+x\to0^+, and 12−x→∞\frac1{\sqrt{2-x}}\to\infty as x→2−x\to2^-. Split at x=1x=1.

Near 0, on (0,1](0,1]: 2−x≥1\sqrt{2-x}\ge1, so |logx2−x|≤|logx|\left|\dfrac{\log x}{\sqrt{2-x}}\right|\le|\log x|, and ∫01|logx|dx=[x−xlogx]01=1\int_0^1|\log x|\,dx=\Big[x-x\log x\Big]_0^1=1 (using xlogx→0x\log x\to0). So ∫01\int_0^1 converges absolutely.

Near 2, on [1,2)[1,2): 0≤logx≤log20\le\log x\le\log2, so |logx2−x|≤log2(2−x)1/2\left|\dfrac{\log x}{\sqrt{2-x}}\right|\le\dfrac{\log2}{(2-x)^{1/2}}, and ∫12dx(2−x)1/2=2\int_1^2\dfrac{dx}{(2-x)^{1/2}}=2 converges (power 12<1\frac12<1).

Both parts converge, so ∫02logx2−xdx\displaystyle\int_0^2\frac{\log x}{\sqrt{2-x}}\,dx is convergent (in fact absolutely).

✓ Checked by computer We checked by computer: the integral converges, with value about 0.22470.2247.

↑ Back to the question list

Find the upper and lower Riemann integrals for the function f defined on [0,1] as follows : f(x)={(1−x2)1/2,if x is rational.(1−x),if x is irrational. Hence, show that f is not Riemann integrable on [0,1].

2024 · Paper II · Q4b · 15 marks

Solution

Comparing the two formulas. For 0≤x≤10\le x\le1, 1−x2=(1−x)(1+x)≥(1−x)2⇒1−x2≥1−x.1-x^2=(1-x)(1+x)\ge(1-x)^2\quad\Longrightarrow\quad\sqrt{1-x^2}\ge1-x .

Both 1−x2\sqrt{1-x^2} and 1−x1-x are continuous and decreasing on [0,1][0,1], and every subinterval contains rationals and irrationals. So on [xi−1,xi][x_{i-1},x_i]: Mi=1−xi−12,mi=1−xi.M_i=\sqrt{1-x_{i-1}^2},\qquad m_i=1-x_i . Thus U(P,f)=U(P,1−x2)U(P,f)=U\big(P,\sqrt{1-x^2}\big) and L(P,f)=L(P,1−x)L(P,f)=L(P,1-x) for every partition PP, which gives ∫01¯f=∫011−x2dx=π4,∫01_f=∫01(1−x)dx=12.\overline{\int_0^1}f=\int_0^1\sqrt{1-x^2}\,dx=\frac{\pi}{4},\qquad\underline{\int_0^1}f=\int_0^1(1-x)\,dx=\frac12 . (∫011−x2dx\int_0^1\sqrt{1-x^2}\,dx is the area of a quarter of the unit circle.)

Since π4≈0.785≠0.5\frac{\pi}{4}\approx0.785\ne0.5, the upper and lower integrals differ, so ff is not Riemann integrable on [0,1][0,1]. ◼\blacksquare

✓ Checked by computer We checked by computer: ∫011−x2=π4\int_0^1\sqrt{1-x^2}=\frac{\pi}{4} and ∫01(1−x)=12\int_0^1(1-x)=\frac12.

↑ Back to the question list

Test the convergence of ∫0∞cosx1+x2dx.

2022 · Paper II · Q1c · 10 marks

Solution

For all x≥0x\ge0, |cosx1+x2|≤11+x2,∫0∞dx1+x2=[tan−1x]0∞=π2<∞.\left|\frac{\cos x}{1+x^2}\right|\le\frac{1}{1+x^2},\qquad\int_0^\infty\frac{dx}{1+x^2}=\Big[\tan^{-1}x\Big]_0^\infty=\frac{\pi}{2}<\infty . By the comparison test, ∫0∞|cosx1+x2|dx\displaystyle\int_0^\infty\left|\frac{\cos x}{1+x^2}\right|dx converges, so the integral is absolutely convergent (hence convergent).

(Its value, found by contour integration, is π2e\dfrac{\pi}{2e}.)

✓ Checked by computer We checked by computer: the integral converges, to about 0.5779=π2e0.5779=\frac{\pi}{2e}.

↑ Back to the question list

Let f(x)=x2 on [0,k], k>0. Show that f is Riemann integrable on the closed interval [0,k] and ∫0kfdx=k33.

2022 · Paper II · Q2a · 15 marks

Solution

Let PnP_n divide [0,k][0,k] into nn equal parts, xi=iknx_i=\dfrac{ik}{n}. Since x2x^2 is increasing on [0,k][0,k], on [xi−1,xi][x_{i-1},x_i] we have Mi=xi2M_i=x_i^2, mi=xi−12m_i=x_{i-1}^2. So U(Pn)=∑i=1ni2k2n2⋅kn=k3n3⋅n(n+1)(2n+1)6,U(P_n)=\sum_{i=1}^n\frac{i^2k^2}{n^2}\cdot\frac kn=\frac{k^3}{n^3}\cdot\frac{n(n+1)(2n+1)}{6}, L(Pn)=∑i=1n(i−1)2k2n2⋅kn=k3n3⋅(n−1)n(2n−1)6.L(P_n)=\sum_{i=1}^n\frac{(i-1)^2k^2}{n^2}\cdot\frac kn=\frac{k^3}{n^3}\cdot\frac{(n-1)n(2n-1)}{6}.

  • Integrable: U(Pn)−L(Pn)=k3n3⋅n2=k3n→0U(P_n)-L(P_n)=\dfrac{k^3}{n^3}\cdot n^2=\dfrac{k^3}{n}\to0, so by the Riemann criterion ff is integrable on [0,k][0,k].
  • Value: as n→∞n\to\infty, both U(Pn)U(P_n) and L(Pn)L(P_n) tend to k36⋅2=k33\dfrac{k^3}{6}\cdot2=\dfrac{k^3}{3}. Since L(Pn)≤∫0kf≤U(Pn)L(P_n)\le\int_0^kf\le U(P_n), ∫0kx2dx=k33.◼\int_0^kx^2\,dx=\frac{k^3}{3}. \qquad\blacksquare

✓ Checked by computer We checked by computer: U(Pn)U(P_n) and L(Pn)L(P_n) both tend to k3/3k^3/3.

↑ Back to the question list

If a function f is monotonic in the interval [a,b], then prove that f is Riemann integrable in [a,b].

2021 · Paper II · Q1c · 10 marks

Solution

Suppose ff is increasing on [a,b][a,b] (the decreasing case is the same with signs reversed). If f(a)=f(b)f(a)=f(b), ff is constant and there is nothing to prove; so let f(b)>f(a)f(b)>f(a). ff is bounded, since f(a)≤f(x)≤f(b)f(a)\le f(x)\le f(b).

Let PnP_n divide [a,b][a,b] into nn equal parts of length h=b−anh=\frac{b-a}{n}. Since ff is increasing, on [xi−1,xi][x_{i-1},x_i] we have Mi=f(xi)M_i=f(x_i) and mi=f(xi−1)m_i=f(x_{i-1}). So U(Pn)−L(Pn)=∑i=1n(f(xi)−f(xi−1))h=h(f(b)−f(a))=(b−a)(f(b)−f(a))n,U(P_n)-L(P_n)=\sum_{i=1}^n\big(f(x_i)-f(x_{i-1})\big)h=h\big(f(b)-f(a)\big)=\frac{(b-a)\big(f(b)-f(a)\big)}{n}, because the sum telescopes.

Given ε>0\varepsilon>0, choose n>(b−a)(f(b)−f(a))εn>\dfrac{(b-a)(f(b)-f(a))}{\varepsilon}. Then U(Pn)−L(Pn)<εU(P_n)-L(P_n)<\varepsilon, so by the Riemann criterion ff is Riemann integrable on [a,b][a,b]. ◼\blacksquare

✓ Proof checked step by step Proof checked step by step.

↑ Back to the question list

Show that ∫0π/2sin2xsinx+cosxdx=12loge(1+2)

2020 · Paper II · Q4b · 15 marks

Solution

Let I=∫0π/2sin2xsinx+cosxdxI=\displaystyle\int_0^{\pi/2}\frac{\sin^2x}{\sin x+\cos x}\,dx. Substituting x→π2−xx\to\frac{\pi}{2}-x swaps sin\sin and cos\cos: I=∫0π/2cos2xsinx+cosxdx.I=\int_0^{\pi/2}\frac{\cos^2x}{\sin x+\cos x}\,dx . Adding, 2I=∫0π/2dxsinx+cosx=12∫0π/2dxsin(x+π4)=12∫π/43π/4cscudu,2I=\int_0^{\pi/2}\frac{dx}{\sin x+\cos x}=\frac{1}{\sqrt2}\int_0^{\pi/2}\frac{dx}{\sin\left(x+\frac{\pi}{4}\right)}=\frac{1}{\sqrt2}\int_{\pi/4}^{3\pi/4}\csc u\,du, using sinx+cosx=2sin(x+π4)\sin x+\cos x=\sqrt2\sin\left(x+\frac{\pi}{4}\right) and u=x+π4u=x+\frac{\pi}{4}. Since ∫cscudu=logtanu2\int\csc u\,du=\log\tan\frac u2, 2I=12[logtan3π8−logtanπ8]=12log2+12−1=12log(2+1)2,2I=\frac{1}{\sqrt2}\left[\log\tan\frac{3\pi}{8}-\log\tan\frac{\pi}{8}\right]=\frac{1}{\sqrt2}\log\frac{\sqrt2+1}{\sqrt2-1}=\frac{1}{\sqrt2}\log(\sqrt2+1)^2, because tan3π8=2+1\tan\frac{3\pi}{8}=\sqrt2+1, tanπ8=2−1\tan\frac{\pi}{8}=\sqrt2-1 and 2+12−1=(2+1)2\frac{\sqrt2+1}{\sqrt2-1}=(\sqrt2+1)^2. Hence I=12loge(1+2).◼I=\frac{1}{\sqrt2}\log_e\left(1+\sqrt2\right). \qquad\blacksquare

✓ Checked by computer We checked by computer: the integral is 0.623225…=12log(1+2)0.623225\ldots=\frac{1}{\sqrt2}\log(1+\sqrt2).

↑ Back to the question list

Evaluate ∫0∞tan−1(ax)x(1+x2)dx,a>0,a≠1.

2019 · Paper II · Q1c · 10 marks

Solution

Let I(a)=∫0∞tan−1(ax)x(1+x2)dxI(a)=\displaystyle\int_0^\infty\frac{\tan^{-1}(ax)}{x(1+x^2)}\,dx, a>0a>0. Then I(0)=0I(0)=0.

Differentiate under the integral sign. ∂∂atan−1(ax)x(1+x2)=1(1+a2x2)(1+x2)\dfrac{\partial}{\partial a}\dfrac{\tan^{-1}(ax)}{x(1+x^2)}=\dfrac{1}{(1+a^2x^2)(1+x^2)}, which is bounded by 11+x2\dfrac1{1+x^2} (integrable), so I′(a)=∫0∞dx(1+a2x2)(1+x2).I'(a)=\int_0^\infty\frac{dx}{(1+a^2x^2)(1+x^2)} .

Partial fractions (here we need a≠1a\ne1): 1(1+a2x2)(1+x2)=11−a2(11+x2−a21+a2x2).\frac{1}{(1+a^2x^2)(1+x^2)}=\frac{1}{1-a^2}\left(\frac{1}{1+x^2}-\frac{a^2}{1+a^2x^2}\right). Since ∫0∞dx1+x2=π2\int_0^\infty\frac{dx}{1+x^2}=\frac{\pi}{2} and ∫0∞a2dx1+a2x2=a⋅π2\int_0^\infty\frac{a^2\,dx}{1+a^2x^2}=a\cdot\frac{\pi}{2}, I′(a)=11−a2⋅π2(1−a)=π2(1+a).I'(a)=\frac{1}{1-a^2}\cdot\frac{\pi}{2}(1-a)=\frac{\pi}{2(1+a)} .

Integrate: I(a)=π2log(1+a)+CI(a)=\dfrac{\pi}{2}\log(1+a)+C, and I(0)=0I(0)=0 gives C=0C=0. So ∫0∞tan−1(ax)x(1+x2)dx=π2log(1+a).\int_0^\infty\frac{\tan^{-1}(ax)}{x(1+x^2)}\,dx=\frac{\pi}{2}\log(1+a). (The formula also holds at a=1a=1, by continuity.)

✓ Checked by computer We checked by computer: numerical integration matches π2log(1+a)\frac{\pi}{2}\log(1+a) for a=0.5,2,3a=0.5,2,3.

↑ Back to the question list

Cover of the UPSC Mains Topic-wise and Year-wise PYQs book (2013–2026)

From the Optional Province team

Strengthen your GS papers

Our UPSC Mains Topic-wise & Year-wise PYQ Book (2013–2026) maps every GS question to the syllabus, so you know what UPSC asks and how often. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

Discuss the convergence of ∫12xlnxdx.

2019 · Paper II · Q4c · 15 marks

Solution

The only trouble point is x=1x=1, where lnx=0\ln x=0; on (1,2](1,2] the integrand is positive and continuous.

Compare with 1x−1\frac{1}{x-1}. As x→1+x\to1^+, x/lnx1/(x−1)=x⋅x−1lnx→1⋅1=1,\frac{\sqrt x/\ln x}{1/(x-1)}=\sqrt x\cdot\frac{x-1}{\ln x}\ \longrightarrow\ 1\cdot1=1, since lnxx−1→1\dfrac{\ln x}{x-1}\to1. By the limit comparison test, ∫12xlnxdx\displaystyle\int_1^2\frac{\sqrt x}{\ln x}\,dx behaves like ∫12dxx−1\displaystyle\int_1^2\frac{dx}{x-1}.

But ∫1+ε2dxx−1=ln1−lnε=−lnε→∞\displaystyle\int_{1+\varepsilon}^2\frac{dx}{x-1}=\ln1-\ln\varepsilon=-\ln\varepsilon\to\infty. Hence the given integral diverges.

✓ Checked by computer We checked by computer: (x−1)xlnx→1(x-1)\dfrac{\sqrt x}{\ln x}\to1 as x→1+x\to1^+.

↑ Back to the question list

Prove the inequality : π29<∫π6π2xsinxdx<2π29.

2018 · Paper II · Q1b · 10 marks

Solution

On [π6,π2]\left[\frac{\pi}{6},\frac{\pi}{2}\right], sinx\sin x increases from 12\frac12 to 11, so 12≤sinx≤1⇒x≤xsinx≤2x,\frac12\le\sin x\le1\quad\Longrightarrow\quad x\le\frac{x}{\sin x}\le2x, with strict inequalities for π6<x<π2\frac{\pi}{6}<x<\frac{\pi}{2}. The functions are continuous, so integrating gives strict inequalities: ∫π/6π/2xdx<∫π/6π/2xsinxdx<∫π/6π/22xdx.\int_{\pi/6}^{\pi/2}x\,dx<\int_{\pi/6}^{\pi/2}\frac{x}{\sin x}\,dx<\int_{\pi/6}^{\pi/2}2x\,dx . Now ∫π/6π/2xdx=12(π24−π236)=12⋅8π236=π29.\int_{\pi/6}^{\pi/2}x\,dx=\frac12\left(\frac{\pi^2}{4}-\frac{\pi^2}{36}\right)=\frac12\cdot\frac{8\pi^2}{36}=\frac{\pi^2}{9} . Hence π29<∫π/6π/2xsinxdx<2π29.◼\frac{\pi^2}{9}<\int_{\pi/6}^{\pi/2}\frac{x}{\sin x}\,dx<\frac{2\pi^2}{9}. \qquad\blacksquare

✓ Checked by computer We checked by computer: the integral is about 1.3001.300, between π2/9≈1.097\pi^2/9\approx1.097 and 2π2/9≈2.1932\pi^2/9\approx2.193.

↑ Back to the question list

Let f(t)=∫0t[x]dx, where [x] denotes the largest integer less than or equal to x. (i) Determine all the real numbers t at which f is differentiable. (ii) Determine all the real numbers t at which f is continuous but not differentiable.

2017 · Paper II · Q2a · 15 marks

Solution

[x][x] is bounded on every bounded interval and has only finitely many discontinuities there (at the integers), so it is integrable and f(t)=∫0t[x]dxf(t)=\int_0^t[x]\,dx is defined for all real tt.

ff is continuous everywhere. On |x|≤K|x|\le K, |[x]|≤K+1|[x]|\le K+1, so |f(t)−f(s)|≤(K+1)|t−s||f(t)-f(s)|\le(K+1)|t-s| for s,t∈[−K,K]s,t\in[-K,K].

Where [x][x] is continuous. By the fundamental theorem of calculus, if the integrand is continuous at tt, then f′(t)=[t]f'(t)=[t]. [x][x] is continuous at every non-integer, so ff is differentiable at every t∉ℤt\notin\mathbb Z, with f′(t)=[t]f'(t)=[t].

At an integer t=nt=n. Using [x]=n[x]=n on [n,n+1)[n,n+1) and [x]=n−1[x]=n-1 on [n−1,n)[n-1,n): limh→0+f(n+h)−f(n)h=limh→0+1h∫nn+hndx=n,limh→0+f(n)−f(n−h)h=limh→0+1h∫n−hn(n−1)dx=n−1.\lim_{h\to0^+}\frac{f(n+h)-f(n)}{h}=\lim_{h\to0^+}\frac1h\int_n^{n+h}n\,dx=n,\qquad\lim_{h\to0^+}\frac{f(n)-f(n-h)}{h}=\lim_{h\to0^+}\frac1h\int_{n-h}^{n}(n-1)\,dx=n-1 . The one-sided derivatives differ, so ff is not differentiable at nn.

Answers.

    1. ff is differentiable at all real tt that are not integers.
    1. ff is continuous but not differentiable exactly at the integers t∈ℤt\in\mathbb Z.

✓ Proof checked step by step Proof checked step by step.

↑ Back to the question list

Is the function f(x)={1n,1n+1<x≤1n0,x=0 Riemann integrable? If yes, obtain the value of ∫01f(x)dx.

2015 · Paper II · Q2b · 15 marks

Solution

Integrable. ff is a step function taking the value 1n\frac1n on (1n+1,1n]\left(\frac1{n+1},\frac1n\right], with f(0)=0f(0)=0. As xx increases, nn decreases and 1n\frac1n increases, so ff is monotonic increasing on [0,1][0,1] (and bounded by 1). A monotonic function is Riemann integrable, so yes, ff is integrable.

Value. On [1N+1,1]\left[\frac{1}{N+1},1\right], ff is a step function with finitely many steps, so ∫1/(N+1)1fdx=∑n=1N1n(1n−1n+1)=∑n=1N1n2(n+1).\int_{1/(N+1)}^1f\,dx=\sum_{n=1}^N\frac1n\left(\frac1n-\frac1{n+1}\right)=\sum_{n=1}^N\frac{1}{n^2(n+1)} . On [0,1N+1]\left[0,\frac1{N+1}\right], 0≤f≤1N+10\le f\le\frac{1}{N+1}, so that piece is at most 1(N+1)2→0\frac{1}{(N+1)^2}\to0. Hence ∫01fdx=∑n=1∞1n2(n+1).\int_0^1f\,dx=\sum_{n=1}^\infty\frac{1}{n^2(n+1)} . Using 1n2(n+1)=1n2−1n+1n+1\dfrac{1}{n^2(n+1)}=\dfrac1{n^2}-\dfrac1n+\dfrac1{n+1}, and ∑(1n+1−1n)=−1\sum\left(\frac{1}{n+1}-\frac1n\right)=-1 (telescoping), ∫01f(x)dx=∑n=1∞1n2−1=π26−1≈0.645.\int_0^1f(x)\,dx=\sum_{n=1}^\infty\frac1{n^2}-1=\frac{\pi^2}{6}-1\approx0.645 .

✓ Checked by computer We checked by computer: the series ∑1n2(n+1)\sum\frac{1}{n^2(n+1)} sums to 0.644934…=π26−10.644934\ldots=\frac{\pi^2}{6}-1.

↑ Back to the question list

Test the convergence of the improper integral ∫1∞dxx2(1+e−x).

2014 · Paper II · Q1b · 10 marks

Solution

For x≥1x\ge1, 1+e−x>11+e^{-x}>1, so 0<1x2(1+e−x)<1x2,∫1∞dxx2=1<∞.0<\frac{1}{x^2(1+e^{-x})}<\frac{1}{x^2},\qquad\int_1^\infty\frac{dx}{x^2}=1<\infty . By the comparison test, ∫1∞dxx2(1+e−x)\displaystyle\int_1^\infty\frac{dx}{x^2(1+e^{-x})} is convergent.

(One can also use the limit test: x2⋅1x2(1+e−x)→1x^2\cdot\dfrac{1}{x^2(1+e^{-x})}\to1, and ∫1∞x−2dx\int_1^\infty x^{-2}\,dx converges since the power 2>12>1.)

✓ Checked by computer We checked by computer: the integral converges, to about 0.8810.881.

↑ Back to the question list

Integrate ∫01f(x)dx, where f(x)={2xsin1x−cos1x,x∈]0,1]0,x=0

2014 · Paper II · Q2b · 15 marks

Solution

Spot the antiderivative. Let F(x)=x2sin1xF(x)=x^2\sin\dfrac1x for x≠0x\ne0, F(0)=0F(0)=0. Then

  • for 0<x≤10<x\le1: F′(x)=2xsin1x−cos1x=f(x)F'(x)=2x\sin\dfrac1x-\cos\dfrac1x=f(x);
  • at 0: F′(0)=limh→0hsin1h=0=f(0)F'(0)=\lim_{h\to0}h\sin\dfrac1h=0=f(0).

So F′=fF'=f on the whole of [0,1][0,1].

ff is integrable. |f(x)|≤2+1=3|f(x)|\le2+1=3, and ff is continuous except at x=0x=0. A bounded function with one discontinuity is Riemann integrable.

Value. If FF is differentiable on [a,b][a,b] and F′=fF'=f is Riemann integrable, then ∫abf=F(b)−F(a)\int_a^bf=F(b)-F(a) (the fundamental theorem of calculus). Hence ∫01f(x)dx=F(1)−F(0)=sin1.\int_0^1f(x)\,dx=F(1)-F(0)=\sin1 .

✓ Checked by computer We checked by computer: numerical integration gives 0.84147…=sin10.84147\ldots=\sin1.

↑ Back to the question list

Let f(x)={x22+4if x≥0−x22+2if x<0 Is f Riemann integrable in the interval [−1,2] ? Why ? Does there exist a function g such that g′(x)=f(x) ? Justify your answer.

2013 · Paper II · Q1c · 10 marks

Solution

Integrable – yes. ff is bounded on [−1,2][-1,2] and continuous except at x=0x=0, where it jumps (left limit 2, value f(0)=4f(0)=4). A bounded function with finitely many discontinuities is Riemann integrable. Its value is ∫−10(−x22+2)dx+∫02(x22+4)dx=116+283=676.\int_{-1}^0\left(-\frac{x^2}{2}+2\right)dx+\int_0^2\left(\frac{x^2}{2}+4\right)dx=\frac{11}{6}+\frac{28}{3}=\frac{67}{6}.

Is there gg with g′=fg'=f? – no (on any interval containing 0, e.g. [−1,2][-1,2]). By Darboux’s theorem, a derivative has the intermediate value property: if g′g' exists on an interval, it takes every value between any two of its values. But near 0, ff takes values ≤2\le2 (for x<0x<0) and ≥4\ge4 (for x≥0x\ge0), and never the value 3. On [−1,1][-1,1], f(−1)=32<3<4=f(0)f(-1)=\frac32<3<4=f(0), yet f(x)≠3f(x)\ne3 for all xx. So ff cannot be a derivative there.

(Integrability and having an antiderivative are different properties: this ff is integrable but has no antiderivative on [−1,2][-1,2].)

✓ Checked by computer We checked by computer: ∫−12f=676\int_{-1}^2f=\frac{67}{6}.

↑ Back to the question list

Let [x] denote the integer part of the real number x, i.e., if n≤x<n+1 where n is an integer, then [x]=n. Is the function f(x)=[x]2+3 Riemann integrable in [−1,2] ? If not, explain why. If it is integrable, compute ∫−12([x]2+3)dx.

2013 · Paper II · Q3d · 10 marks

Solution

On [−1,2][-1,2], [x][x] takes only the values −1,0,1,2-1,0,1,2: [x]2+3={4,−1≤x<03,0≤x<14,1≤x<27,x=2.[x]^2+3=\begin{cases}4,&-1\le x<0\\3,&0\le x<1\\4,&1\le x<2\\7,&x=2.\end{cases} This is a bounded step function with finitely many discontinuities (at 0,1,20,1,2), so it is Riemann integrable. The value at the single point x=2x=2 does not affect the integral: ∫−12([x]2+3)dx=4⋅1+3⋅1+4⋅1=11.\int_{-1}^2\left([x]^2+3\right)dx=4\cdot1+3\cdot1+4\cdot1=11 .

✓ Checked by computer We checked by computer: the integral is 11.

↑ Back to the question list

Let f(x) be differentiable on [0,1] such that f(1)=f(0)=0 and ∫01f2(x)dx=1. Prove that ∫01xf(x)f′(x)dx=−12.

2012 · Paper II · Q3b · 15 marks

Solution

(We assume, as the question intends, that f′f' is integrable on [0,1][0,1], e.g. continuous.)

Since ddx(f22)=ff′\dfrac{d}{dx}\left(\dfrac{f^2}{2}\right)=f f', integrate by parts with u=xu=x and dv=ff′dxdv=ff'\,dx, v=f22v=\dfrac{f^2}{2}: ∫01xf(x)f′(x)dx=[xf2(x)2]01−∫01f2(x)2dx.\int_0^1x\,f(x)f'(x)\,dx=\left[x\,\frac{f^2(x)}{2}\right]_0^1-\int_0^1\frac{f^2(x)}{2}\,dx . The boundary term is 1⋅f(1)22−0=0\dfrac{1\cdot f(1)^2}{2}-0=0 because f(1)=0f(1)=0. And ∫01f2dx=1\int_0^1f^2\,dx=1. Hence ∫01xf(x)f′(x)dx=0−12=−12.◼\int_0^1x\,f(x)\,f'(x)\,dx=0-\frac12=-\frac12. \qquad\blacksquare

✓ Proof checked step by step Proof checked step by step.

↑ Back to the question list

Give an example of a function f(x), that is not Riemann integrable but |f(x)| is Riemann integrable. Justify.

2012 · Paper II · Q4b · 20 marks

Solution

On [0,1][0,1] let f(x)={1,x rational−1,x irrational.f(x)=\begin{cases}1,&x\text{ rational}\\-1,&x\text{ irrational.}\end{cases}

ff is not Riemann integrable. Every subinterval of every partition contains both rationals and irrationals, so Mi=1M_i=1 and mi=−1m_i=-1. Hence for every partition PP, U(P,f)=∑1⋅Δxi=1,L(P,f)=∑(−1)Δxi=−1.U(P,f)=\sum1\cdot\Delta x_i=1,\qquad L(P,f)=\sum(-1)\Delta x_i=-1 . The upper integral is 11 and the lower integral is −1-1; they differ.

|f||f| is Riemann integrable. |f(x)|=1|f(x)|=1 for every xx, a constant function, with ∫01|f|dx=1\int_0^1|f|\,dx=1.

So ff is not integrable while |f||f| is. ◼\blacksquare (This shows the converse of “ff integrable ⇒\Rightarrow |f||f| integrable” is false.)

✓ Proof checked step by step Proof checked step by step.

↑ Back to the question list

Let f be a continuous function on [0,1]. Using first mean value theorem on Integration, prove that limn→∞∫01nf(x)1+n2x2dx=π2f(0).

2008 · Paper II · Q3c · 15 marks

Solution

First mean value theorem. If ff is continuous and g≥0g\ge0 is integrable on [a,b][a,b], then ∫abfg=f(ξ)∫abg\int_a^bfg=f(\xi)\int_a^bg for some ξ∈[a,b]\xi\in[a,b].

Here gn(x)=n1+n2x2≥0g_n(x)=\dfrac{n}{1+n^2x^2}\ge0, with ∫gndx=tan−1(nx)\int g_n\,dx=\tan^{-1}(nx). Using the theorem on the whole of [0,1][0,1] is not enough (we would not know where ξ\xi is), so split at δn=1n\delta_n=\dfrac1{\sqrt n}.

Near 0. On [0,δn][0,\delta_n]: ∫0δnnf(x)1+n2x2dx=f(ξn)tan−1(nδn)=f(ξn)tan−1n,0≤ξn≤1n.\int_0^{\delta_n}\frac{nf(x)}{1+n^2x^2}\,dx=f(\xi_n)\tan^{-1}(n\delta_n)=f(\xi_n)\tan^{-1}\sqrt n,\qquad0\le\xi_n\le\frac1{\sqrt n}. As n→∞n\to\infty: ξn→0\xi_n\to0, so f(ξn)→f(0)f(\xi_n)\to f(0) by continuity, and tan−1n→π2\tan^{-1}\sqrt n\to\frac{\pi}{2}. This part tends to π2f(0)\frac{\pi}{2}f(0).

Away from 0. On [δn,1][\delta_n,1], with |f|≤M|f|\le M (continuous on [0,1][0,1]): |∫δn1nf(x)1+n2x2dx|≤M(tan−1n−tan−1n)→M(π2−π2)=0.\left|\int_{\delta_n}^1\frac{nf(x)}{1+n^2x^2}\,dx\right|\le M\left(\tan^{-1}n-\tan^{-1}\sqrt n\right)\ \longrightarrow\ M\left(\frac{\pi}{2}-\frac{\pi}{2}\right)=0 .

Adding the two parts, limn→∞∫01nf(x)1+n2x2dx=π2f(0).◼\lim_{n\to\infty}\int_0^1\frac{nf(x)}{1+n^2x^2}\,dx=\frac{\pi}{2}f(0). \qquad\blacksquare

✓ Proof checked step by step Proof checked step by step; we also checked numerically with f=cosf=\cos (values 1.556,1.569,1.57061.556,1.569,1.5706 for n=102,103,104n=10^2,10^3,10^4, approaching π/2\pi/2).

↑ Back to the question list

More on Real Analysis

Questions: UPSC Civil Services (Main) Examination, Mathematics Paper II, 2008–2026. Solutions: Optional Province. Found an error? Tell us.

Spotted an error? Tell us.

We classify every PYQ with care, but mistakes can slip in. If a question is in the wrong topic, has a typo, the wrong year, or is missing, let us know. We review every report and update the page.

Report an Error
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted