How do i calculate are on Trapezoidal rule?
Mostra commenti meno recenti
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
Risposte (2)
Torsten
il 5 Feb 2015
0 voti
n is the number of trapezoids or the number of interval points ?
Best wishes
Torsten.
markus palmu
il 5 Feb 2015
Modificato: markus palmu
il 5 Feb 2015
0 voti
3 Commenti
Torsten
il 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
il 6 Feb 2015
Torsten
il 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.
Categorie
Scopri di più su Mathematics in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!