I need help with the following problem:

Let f(x)= 2/(x+2) on the interval [-1,1].

A.) Find the integral of f on the given interval using the the Fundamental Theorem of Calculus. Give both the exact answer and, using a calculator, a 5 digit approximation to this answer.

To solve this I think you would do this:

∫[from -1 to 1] (2/x+2) dx

=2ln|x+2| from -1 to 1

=2ln|3|-2ln|1|

exact answer=2ln|3|

Approximate answer=2.19722

B.) Find T-subscript4 ( using Trapezoidal Rule) and S-subscript4 (using Simpson’s Rule). Write the calculations explicitly showing each of the function evaluations. Then use a calculator to give the answers as five digit approximations.

I think to find T-sub4 you would do the following:

DeltaX=1-(-1)/4=2/4=½

Xsub0=a=-1,

xsub1= a + deltax=-1+½=-1,

xsub2=a+2*deltax=-1+2*(½)=-1+1=0,

xsub3=a + 3*deltax= -1+ 3*(½)=½,

xsub4= a + 4*deltax= -1+4*(½)= -1 +2 =1

Trapezoidal rule: (b-a)/(2n)= 1-(-1)/2(4)=2/8=¼

=¼(f(xsub0)+2f(xsub1)+2f(xsub2)+2f(xsub3)+f(xsub4) )

=¼((2/(0-2))+2(2/-1-2)+2(2/0-2)+2(2/(½-2))+(2/1-2)

=¼ (-1+ -4/3 + -2 + -3 + -2)

=¼(-27/3)

=-27/12

T-sub4=-2.25000

To find S-sub4:

Using Simpsons rule:

(b-a)/3n= 1-(-1)/3(4) =2/12 = 1/6

=1/6(f(xsub0)+4f(xsub1)+2f(xsub2)+4f(xsub3)+f(xsub4))

=1/6((2/(0-2))+4(2/-1-2)+2(2/0-2)+4(2/(½-2))+(2/1-2))

=1/6(-1 + -8/3 + -2 + -6 + -2)

=1/6(-41/3)

=-41/18

S-sub4=-2.27777

Am I calculating this problem correctly or am I doing something wrong? Mainly what I need help on is part B. I think I did everything right in part A, but if I did something wrong please let me know. I’m thinking I may be messing something up in part B because I am getting a negative answer. Thanks in advance to anyone who can help.