Compute approximate value of definite integral using trapezoid rule and simpsons rule? Please help?
Question is in the file attachment
do you know what the trapezoid rule is? \[\int\limits_{a}^{b} e^{x^{2}} \approx (b-a)\left[ \frac{ f(a) + f(b)}{ 2} \right]\]
simpsons rule is \[\int\limits_{a}^{b}f(x)dx= \frac{ b-a }{ 6 }\left[ f(a)+4f(\frac{ a+b }{ 2 })+f(b) \right]\]
I thought that was the trapezoid rule
you showed the trapezium rule
O okay so how do I do this one then?
oh it is the trapezoid rule, it was the same as i said lol one sec i gotta re write the working out
b-a=2-0=2 b-a=2 we have n=4 so we want to divide the whole thing by 4 since we are dividing by 4, we divide b-a by 4 to get the height of each strip this gives 2/4=0.5 so we will do values 0, 0.5, 1, 1.5, 2 now we have the formula \[(2-0)\left[ \frac{ f(0)+f(0.5)+f(1)+f(1.5)+f(2) }{ 4 } \right]\]
Wait what about the simpson
just sub into the formula i gave you for simpsons rule
pretty straight forward
wait so was that for the trapezoid rule? and was the first formula that u gave me wrong?
nah we had the same formula
Okay Gimme a sec
I will give u ur best response points but lemme see how it turns out for the simpsons rule so one second
okay it is right i confused myself let me know if you need anything explained
question.
for the first part. why did you add 0, 0.5, 1, 1.5, and 2
f(0) + f(0.5) + f(1) + f(1.5) +f(2)
we have n=4 so we want to find the intervals to which we use as our values x0 x1 x2 x3 x4 x5 etc since n=4 we divide the difference of a and b by n this gave us 0.5 so the intervals of 0.5 gaves us the values x0=0 x1=0.5 x2=1 x3=1.5 x4=2
then we did f(x0)+f(x1)+...f(xn)
okay so you did that for just 0-2 right
say it was f 4-0 then i would put 8 values right?
yes because our limits only go from 0 to 2
0-4**
got it
here is your best response points. but i still haven't done this for the simpsons rule so i will ask you if i have any problems. thx arnie
if you had limits from 0 to 4 and n=4 you would do 4-0 then divide by 4 this gives intervals of 1 therefore you get x0=0 x1=1 x2=2 x3=3 x4=4
wait why is the denominator 4?
isn't it supposed to be 2?
it will simplify to 1/2
Join our real-time social learning platform and learn together with your friends!