How do you Use the trapezoidal rule with n=10n=10 to approximate the integral int_1^2ln(x)/(1+x)dx∫21ln(x)1+xdx?
1 Answer
The trapezoidal rule is:
-
First, we need to find our different values of x: since
1<=x<=2 and we need to split up our function into ten parts. So, quite simply, the values of x we need are 1, 1.1, 1.2, ..., 1.9, 2, withx_1=1 ,x_2=1.1 , and so on. -
Next, we need to substitute the values of
a andb , which are 1 and 2 respectively, into the equation. Also plug inn=10 .
int_1^2ln(x)/(1+x)dx ~~ (2-1)/(2*10)*(f(x_1)+2f(x_2)+...+2f(x_10)+f(x_(11))) -
Next, we evaluate
f(x_1) ,f(x_2) and so on. As an example:
f(x_1) = f(1) = ln(1)/(1+1) = ln(1)/2 = 0
f(x_2) = f(1.1) = ln(1.1)/(1+1.1) = ln(1.1)/2.1 ~~ 0.04539 -
Finally, we plug all these values into our equation.
int_1^2ln(x)/(1+x)dx ~~ (2-1)/(2*10)*(f(1)+2f(1.1)+...)
This should provide an approximate answer to any integral.