Question #74242

For h=0.5,. 25,.125 solve integration from 0 to 1, dx/1+x2 and improve the accuracy by romberg integration. Compare your value with the real value.

Expert's answer

Answer on Question #74242 – Math – Quantitative Methods

Question

For h=0.5,25,125h=0.5, 25, 125 solve integration from 0111+x2dx\int_0^1\frac{1}{1 + x^2} dx and improve the accuracy by Romberg integration. Compare your value with the real value.

Solution

Evaluate an integral 0111+x2dx\int_0^1\frac{1}{1 + x^2} dx and improve the accuracy by Romberg integration. We begin by using the Trapezoidal Rule, or, equivalently, the Composite Trapezoidal Rule


abf(x)dxh2[f0+2i=1N1fi+fN],h=baN,xi=x0+ih,x0=a,xN=b\int_{a}^{b} f(x) dx \approx \frac{h}{2} \left[ f_{0} + 2 \sum_{i=1}^{N-1} f_{i} + f_{N} \right], \quad h = \frac{b - a}{N}, \quad x_{i} = x_{0} + ih, \quad x_{0} = a, \quad x_{N} = b


We get


N=1,h=1,IT=h2[f0+f1]=0.750000.N = 1, \quad h = 1, \quad I_{T} = \frac{h}{2} \left[ f_{0} + f_{1} \right] = 0.750000.N=2,h=12,IT=h2[f0+2f1+f2]=0.775000N = 2, \quad h = \frac{1}{2}, \quad I_{T} = \frac{h}{2} \left[ f_{0} + 2 f_{1} + f_{2} \right] = 0.775000N=4,h=14,IT=h2[f0+2f1+2f2+2f3+f4]=0.782794N = 4, \quad h = \frac{1}{4}, \quad I_{T} = \frac{h}{2} \left[ f_{0} + 2 f_{1} + 2 f_{2} + 2 f_{3} + f_{4} \right] = 0.782794N=8,h=18,IT=h2[f0+2f1+2f2+2f3+2f4+2f5+2f6+2f7+f8]=0.784752N = 8, \quad h = \frac{1}{8}, \quad I_{T} = \frac{h}{2} \left[ f_{0} + 2 f_{1} + 2 f_{2} + 2 f_{3} + 2 f_{4} + 2 f_{5} + 2 f_{6} + 2 f_{7} + f_{8} \right] = 0.784752N=8,h=18,N = 8, \quad h = \frac{1}{8},IT=h2[f0+2f1+2f2+2f3+2f4+2f5+2f6+2f7+2f8+2f9+2f10+2f11+2f12+2f13+2f14+2f15+f16]=0.785452I_{T} = \frac{h}{2} \left[ \begin{array}{l} f_{0} + 2 f_{1} + 2 f_{2} + 2 f_{3} + 2 f_{4} + 2 f_{5} + 2 f_{6} + 2 f_{7} + 2 f_{8} + 2 f_{9} + 2 f_{10} \\ + 2 f_{11} + 2 f_{12} + 2 f_{13} + 2 f_{14} + 2 f_{15} + f_{16} \end{array} \right] = 0.785452


Exact solution of the given integral is as follows:


0111+x2dx=[tan1x]01=tan11tan10=0.785398 in radians.\int_{0}^{1} \frac{1}{1 + x^{2}} dx = \left[ \tan^{-1} x \right]_{0}^{1} = \tan^{-1} 1 - \tan^{-1} 0 = 0.785398 \text{ in radians}.


Compare. Approximate value is 0.785452 when h=1/16h=1/16 and the real value is 0.785398.

Using trapezoidal rule with Romberg integration to achieve the accuracy of 10610^{-6}

R1=h212f(ξ),0<ξ<1R_{1} = \frac{h^{2}}{12} f^{-}(\xi), \quad 0 < \xi < 1


Since f(x)=11+x2f(x) = \frac{1}{1 + x^2} for 0x10 \leq x \leq 1, for achieving accuracy of 10610^{-6}, we require h=0.007h = 0.007. Hence at least (10)/0.007=144(1-0)/0.007 = 144 function evaluations to achieve this accuracy if trapezoidal rule is used directly.

Answer provided by https://www.AssignmentExpert.com

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS