← 2020 Paper 2

UPSC 2020 Maths Optional Paper 2 Q7b — Step-by-Step Solution

20 marks · Section B

Gaussian quadrature · Numerical Analysis · asked 3× in 13 yrs · Read the full method →

Question

Find a quadrature formula 01f(x)dxx(1x)=α1f(0)+α2f ⁣(12)+α3f(1)\int_0^1 f(x)\frac{dx}{\sqrt{x(1-x)}}=\alpha_1 f(0)+\alpha_2 f\!\left(\frac12\right)+\alpha_3 f(1) which is exact for polynomials of highest possible degree. Then use the formula to evaluate 01dxxx3\int_0^1\frac{dx}{\sqrt{x-x^3}} (correct up to three decimal places).

Technique

Moment matching for fixed (non-Gauss) nodes; weights from a 3×33\times3 linear system using Beta-integral moments of 1/x(1x)1/\sqrt{x(1-x)}; then peel off 1/1+x1/\sqrt{1+x} as ff and apply the rule.

Solution

Step 1 — Moments of the weight w(x)=1/x(1x)w(x)=1/\sqrt{x(1-x)}

Using 01xndxx(1x)\int_0^1\frac{x^n\,dx}{\sqrt{x(1-x)}} (Beta integrals):

μ0=01dxx(1x)=π,μ1=01xdxx(1x)=π2,\mu_0=\int_0^1\frac{dx}{\sqrt{x(1-x)}}=\pi,\quad \mu_1=\int_0^1\frac{x\,dx}{\sqrt{x(1-x)}}=\frac{\pi}{2}, μ2=3π8,μ3=5π16.\mu_2=\frac{3\pi}{8},\quad \mu_3=\frac{5\pi}{16}.

Step 2 — Determine α1,α2,α3\alpha_1,\alpha_2,\alpha_3 (exact for 1,x,x21,x,x^2)

With three free weights at the fixed nodes 0,12,10,\tfrac12,1, demand exactness for f=1,x,x2f=1,x,x^2:

α1+α2+α3=μ0=π,0α1+12α2+1α3=μ1=π2,0α1+14α2+1α3=μ2=3π8.\begin{aligned} \alpha_1+\alpha_2+\alpha_3&=\mu_0=\pi,\\ 0\cdot\alpha_1+\tfrac12\alpha_2+1\cdot\alpha_3&=\mu_1=\tfrac{\pi}{2},\\ 0\cdot\alpha_1+\tfrac14\alpha_2+1\cdot\alpha_3&=\mu_2=\tfrac{3\pi}{8}. \end{aligned}

Subtracting the third from the second: 14α2=π8α2=π2\tfrac14\alpha_2=\tfrac{\pi}{8}\Rightarrow\alpha_2=\tfrac{\pi}{2}. Then α3=3π814π2=3π8π8=π4\alpha_3=\tfrac{3\pi}{8}-\tfrac14\cdot\tfrac\pi2=\tfrac{3\pi}{8}-\tfrac{\pi}{8}=\tfrac{\pi}{4}, and α1=ππ2π4=π4\alpha_1=\pi-\tfrac\pi2-\tfrac\pi4=\tfrac{\pi}{4}.

  α1=π4,α2=π2,α3=π4.  \boxed{\;\alpha_1=\frac{\pi}{4},\quad\alpha_2=\frac{\pi}{2},\quad\alpha_3=\frac{\pi}{4}.\;}

Step 3 — Highest degree of exactness

Test f=x3f=x^3:

rule=π40+π218+π41=π16+π4=5π16=μ3. \text{rule}=\frac{\pi}{4}\cdot0+\frac{\pi}{2}\cdot\frac18+\frac{\pi}{4}\cdot1=\frac{\pi}{16}+\frac{\pi}{4}=\frac{5\pi}{16}=\mu_3.\ \checkmark

Test f=x4f=x^4: μ4=01x4dxx(1x)=35π128\mu_4=\int_0^1\frac{x^4dx}{\sqrt{x(1-x)}}=\frac{35\pi}{128}, while the rule gives π2116+π4=π32+π4=9π32=36π12835π128\frac{\pi}{2}\cdot\frac1{16}+\frac\pi4=\frac{\pi}{32}+\frac{\pi}{4}=\frac{9\pi}{32}=\frac{36\pi}{128}\neq\frac{35\pi}{128}. Not exact.

The formula is exact for all polynomials of degree3.\boxed{\text{The formula is exact for all polynomials of degree}\le 3.}

Step 4 — Evaluate 01dxxx3\displaystyle\int_0^1\frac{dx}{\sqrt{x-x^3}}

Factor xx3=x(1x2)=x(1x)(1+x)x-x^3=x(1-x^2)=x(1-x)(1+x), so

01dxxx3=0111+xdxx(1x),\int_0^1\frac{dx}{\sqrt{x-x^3}}=\int_0^1\frac{1}{\sqrt{1+x}}\cdot\frac{dx}{\sqrt{x(1-x)}},

i.e. take f(x)=11+xf(x)=\dfrac{1}{\sqrt{1+x}}. Node values:

f(0)=1,f ⁣(12)=13/2=23=0.816497,f(1)=12=0.707107.f(0)=1,\quad f\!\left(\tfrac12\right)=\frac{1}{\sqrt{3/2}}=\sqrt{\tfrac23}=0.816497,\quad f(1)=\frac{1}{\sqrt2}=0.707107.

Apply the formula:

Iπ4(1)+π2(0.816497)+π4(0.707107)=π4(1+0.707107)+π2(0.816497).I\approx\frac{\pi}{4}(1)+\frac{\pi}{2}(0.816497)+\frac{\pi}{4}(0.707107) =\frac{\pi}{4}(1+0.707107)+\frac{\pi}{2}(0.816497). =π4(1.707107)+π2(0.816497)=0.7853981.707107+1.5707960.816497.=\frac{\pi}{4}(1.707107)+\frac{\pi}{2}(0.816497)=0.785398\cdot1.707107+1.570796\cdot0.816497. =1.340755+1.282553=2.62331.=1.340755+1.282553=2.62331.

Answer

  01dxxx32.623  \boxed{\;\int_0^1\frac{dx}{\sqrt{x-x^3}}\approx 2.623\;}
We post more of this — worked solutions, CSAT trap breakdowns, guide chapters — a few times a week on Telegram. Free, no sign-in. Join

This solution is part of the Maths Coverage Map — 13 years, mapped. Get the take-away PDF free.