Checked content

File:Integration rectangle.svg

Description Numerical integration by Riemann sums. The function being used is f(x) = x^2 + sin(2\pi x).
Date 2010-11-04 06:17 (UTC)
Source
Author
  • derivative work: Kpengboy ( talk)
I, the copyright holder of this work, hereby publish it under the following license:
Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

Gnuplot Script Used

# SVG output
set terminal svg size 340 110
set output "Integration_rectangle.svg"
set samples 1000

# Configure border, axes, etc.
unset key
set xrange [-2:2]
set yrange [-1.5:4.75]
set border 3 lt 1 lc rgb "black"
set grid
set xtics autofreq 1
set ytics autofreq 2

# Define our function
f(x) = x**2 + sin(2*pi*x)

# Draw rectangles
set for [i = 0:15] object i+1 rect from -2+.25*i,0 to -2+.25*(i+1),f(-2+.25*(2*i+1)/2) fs empty border lt 3

# Plot
plot f(x)
The following pages on Schools Wikipedia link to this image (list may be incomplete):

Metadata

I want to learn more...

Wikipedia for Schools brings Wikipedia into the classroom. SOS Children's Villages helps those who have nothing and no one, giving them back the famly they have lost and bringing them the very best opportunities for a happy, healthy future. You can help by sponsoring a child.