Jump to: navigation, search

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

6502acme, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, arm, asm, asp, autohotkey, autoit, avisynth, awk, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, cadlisp, cfm, cil, clojure, cmake, cobol, coffeescript, cpp, csharp, css, d, delphi, diff, dos, dot, e, ecmascript, eiffel, email, erlang, euphoria, fortran, freebasic, fsharp, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, html4strict, html5, ini, io, j, java, java5, javascript, jquery, latex, ldif, lisp, llvm, locobasic, lolcode, lua, make, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, oberon2, objc, ocaml, octave, oobas, oorexx, oracle11, oracle8, oz, parigp, pascal, pcre, perl, perl6, php, pic16, pli, plsql, povray, powershell, progress, prolog, properties, purebasic, pycon, python, q, qbasic, reg, rexx, robots, rsplus, ruby, sas, scala, scheme, scilab, smalltalk, sparql, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, urbi, vala, vb, vbnet, verilog, vhdl, visualfoxpro, visualprolog, whois, winbatch, xml, xpp, yaml, zxbasic

Let f : DR be a function defined on a subset, D, of the real line, R. Let I = [a, b] be a closed interval contained in D, and let

P= \left \{[x_0,x_1),[x_1,x_2),\dots,[x_{n-1},x_{n}] \right \},

be a partition of I, where


The Riemann sum of f over I with partition P is defined as

S = \sum_{i=1}^{n} f(x_i^*)(x_{i}-x_{i-1}), \quad x_{i-1}\le x_i^* \le x_i.

The choice of x_i^* in the interval [x_{i-1},x_i] is arbitrary.

Example: Specific choices of x_i^* give us different types of Riemann sums:

  • If x_i^*=x_{i-1} for all i, then S is called a left Riemann sum.
  • If x_i^*=x_i for all i, then S is called a right Riemann sum.
  • If x_i^*=\tfrac{1}{2}(x_i+x_{i-1}) for all i, then S is called a middle Riemann sum.
  • The average of the left and right Riemann sum is the trapezoidal sum.
  • If it is given that
S = \sum_{i=1}^{n} v_i(x_{i}-x_{i-1}),
where v_i is the supremum of f over [x_{i-1},x_i], then S is defined to be an upper Riemann sum.
  • Similarly, if v_i is the infimum of f over [x_{i-1},x_i], then S is a lower Riemann sum.

The Cartesian coordinates x and y can be converted to polar coordinates r and φ with r ≥ 0 and φ in the interval (−π, π] by:[1]

r = \sqrt{x^2 + y^2} \quad (as in the Pythagorean theorem or the Euclidean norm), and
\varphi = \operatorname{atan2}(y, x) \quad,

where atan2 is a common variation on the arctangent function defined as

\operatorname{atan2}(y, x) =
\arctan(\frac{y}{x}) & \mbox{if } x > 0\\
\arctan(\frac{y}{x}) + \pi & \mbox{if } x < 0 \mbox{ and } y \ge 0\\
\arctan(\frac{y}{x}) - \pi & \mbox{if } x < 0 \mbox{ and } y < 0\\
\frac{\pi}{2} & \mbox{if } x = 0 \mbox{ and } y > 0\\
-\frac{\pi}{2} & \mbox{if } x = 0 \mbox{ and } y < 0\\
\text{undefined} & \mbox{if } x = 0 \mbox{ and } y = 0


  1. Template:Cite book