How do i calculate are on Trapezoidal rule?
Show older comments
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)
Torsten
on 5 Feb 2015
0 votes
n is the number of trapezoids or the number of interval points ?
Best wishes
Torsten.
markus palmu
on 5 Feb 2015
Edited: markus palmu
on 5 Feb 2015
0 votes
3 Comments
Torsten
on 5 Feb 2015
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.
markus palmu
on 6 Feb 2015
Torsten
on 6 Feb 2015
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.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!