SUNY Geneseo Department of Mathematics
Monday, November 10
Math 221 02
Fall 2014
Prof. Doug Baldwin
> x = seq(0,2,length=5)
> x
[1] 0.0 0.5 1.0 1.5 2.0
> y = x^2
> y
[1] 0.00 0.25 1.00 2.25 4.00
> areas = y * 0.5
> sum(areas)
[1] 3.75
> x = seq(0,2,length=5000)
> y = x^2
> width = 2/4999
> sum( y * width )
[1] 2.667467