How do i calculate are on Trapezoidal rule?

I have to calculate are on using Trapezoidal rule, how do i do it? f(x) = 11*sin(0.5*x)-3*x; [1,4] a = 1; b = 4; n = 7; And the answer have to be second (on the left) trapezoidal area with 2 decimal places. n = is the interval points

Answers (2)

n is the number of trapezoids or the number of interval points ?
Best wishes
Torsten.
markus palmu
markus palmu on 5 Feb 2015
Edited: markus palmu on 5 Feb 2015
The n is interval points
Thanks by markus

3 Comments

So the second trapezoid goes from x1=1.5 to x2=2.
The parallel sides have lengths
l1=f(1.5)=11*sin(0.5*1.5)-3*1.5 and
l2=11*sin(0.5*2)-3*2.
So the area of this trapezoid is
A=(x2-x1)*(l1+l2)/2=0.5*((11*sin(0.5*1.5)-3*1.5)+(11*sin(0.5*2)-3*2))/2.
Best wishes
Torsten.
it is not right answer :(
I get A=1.56 from the above formula.
If you use your electronic calculator, maybe you have to switch from degrees to radians in the sin-function :-)
Best wishes
Torsten.

Sign in to comment.

Categories

Asked:

on 5 Feb 2015

Commented:

on 6 Feb 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!