File:Riemann Sum.gif

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(1,075 × 359 pixels, file size: 4.46 MB, MIME type: image/gif, looped, 231 frames, 23 s)

Captions

Captions

Visual rapresentation of the Riemann sum converging to the area below a curve

Summary[edit]

Description
English: A "Riemann integral" is an intuitive but rigorous way to define the area below a curve by approximating it as the sum of a bunch of rectangles. As the width of the rectangles goes to zero, this sum converges to the desired area.
Date
Source https://twitter.com/j_bertolotti/status/1562066595442315267
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 13.1 code[edit]

f[x_] := (BesselJ[0, x] + 0.5)/1.5
\[Delta]values = Table[10^x, {x, 1, Log[10, 0.05], -1./100}];
frames = Table[
   sum = Table[{\[Delta]min, Total@Table[ f[j*\[Delta]min]*\[Delta]min, {j, 1, 10/\[Delta]min}]}, {\[Delta]min, Select[\[Delta]values, # > \[Delta] &]}];
   Grid[{{
      Plot[f[x], {x, 0, 10}, PlotStyle -> {Thick, Black} , AxesStyle -> {Black, Thick}, AxesLabel -> {"x", "y"}, LabelStyle -> {Bold, Black, FontSize -> 14}, PlotRange -> {{0, 10}, {0, 1}}, Epilog -> {Orange, Opacity[0.25], EdgeForm[Directive[Thick, Orange, Opacity[0.5]]], Table[Rectangle[{j*\[Delta], 0}, {(j + 1)*\[Delta], f[j*\[Delta]]}], {j, 0, 10/\[Delta]}]}, ImageSize -> 400]
      ,
      ListLogLinearPlot[sum, Joined -> True, PlotStyle -> {Thick, Black}, Axes -> False, Frame -> True, FrameLabel -> {"Sampling interval size", "Total area of rectangles"}, LabelStyle -> {Bold, Black, FontSize -> 14}, PlotRange -> {{0.05, 10}, {0, 4.1}}, ImageSize -> 400]
      }}]
   , {\[Delta], \[Delta]values}];
ListAnimate[frames]

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current08:44, 24 August 2022Thumbnail for version as of 08:44, 24 August 20221,075 × 359 (4.46 MB)Berto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata