File:MVTProof.svg

Summary

Description
English: Illustration for the proof of the Mean Value Theorem for integration
Deutsch: Illustration zum Beweis des Mittelwertsatzes für Integrale
Date
Source Own work
Author Auswahlaxiom
SVG development
InfoField
Source code
InfoField

Asymptote code

import graph;

size(8cm, 0);

defaultpen(fontsize(14)+linewidth(0.8));

real dt = 0.04;
int n = 0;

void ship() {
	write(n);
	shipout(outprefix() + format("-%04d", n));
	++n;
}

real inf(real f(real), real a, real b, int n) {
	return min(map(f, uniform(a, b, n)));
}

real sup(real f(real), real a, real b, int n) {
	return max(map(f, uniform(a, b, n)));
}

real average(real f(real), real a, real b, int n) {
	return sum(map(f, uniform(a+(b-a)/(2*n), b-(b-a)/(2*n), n-1)))/n;
}

real f(real x) {
	return 2+4/(13-x)+sin(2sqrt(x^2+3)-3)/2-(x-4)^2/16;
}

real xmax = 8;

real m = inf(f, 0, xmax, 100);
real M = sup(f, 0, xmax, 100);
real c = average(f, 0, xmax, 100);
pair[] points = intersectionpoints((0, c)--(xmax, c), graph(f, 0, xmax));

xtick("$\xi$", xmax, invisible);
ytick("$f(\xi)$", M, invisible);

fill((0, 0)--graph(f, 0, xmax)--(xmax, 0)--cycle, rgb(1.0, 0.5, 0.0)+opacity(0.5));
fill(box((0, 0), (xmax, c)), rgb(0.0, 0.5, 1.0)+opacity(0.5));
yequals(m, gray(0.4));
yequals(M, gray(0.4));
draw(Label("$f$", MidPoint, N+(0,-0.7)), graph(f, 0, xmax));
int j = 0;
for(pair p : points) {
	draw((p.x, 0)--p, dashed);
	if(j == 2) xtick("$\xi$", p.x);
	++j;
}
xaxis(0, xmax, above=true);
yaxis(0, above=true);
yaxis(YEquals(xmax), 0, above=true);
yequals(c);
xtick("$a$", 0);
xtick("$b$", xmax);
ytick("$m$", m, gray(0.4));
ytick("$M$", M, gray(0.4));
ytick("$f(\xi)$", c);
dot(points);
ship();

Licensing

Auswahlaxiom, the copyright holder of this work, hereby publishes it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
Attribution:
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#MVTProof.svgCategory:Self-published work
Category:Intermediate value theorem Category:Integral calculus
Category:CC-BY-SA-4.0 Category:Integral calculus Category:Intermediate value theorem Category:Self-published work Category:Valid SVG created with Asymptote code:Diagrams