use quarto, not Pluto to render pages

This commit is contained in:
jverzani committed 2022-07-24 16:38:24 -04:00
1 parent 93c993206a
commit 7b37ca828c
879 files changed
+793311 -2678

No files matched your search

@@ -0,0 +1,15 @@
{
"hash": "715a589fb1278eed89b4b70650817c62",
"result": {
"markdown": "# Mean value theorem for integrals\n\n\n\nThis section uses these add-on packages:\n\n``` {.julia .cell-code}\nusing CalculusWithJulia\nusing Plots\nusing QuadGK\n```\n\n\n\n\n---\n\n\n## Average value of a function\n\n\nLet $f(x)$ be a continuous function over the interval $[a,b]$ with $a < b$.\n\n\nThe average value of $f$ over $[a,b]$ is defined by:\n\n\n\n$$\n\\frac{1}{b-a} \\int_a^b f(x) dx.\n$$\n\n\nIf $f$ is a constant, this is just the contant value, as would be expected. If $f$ is *piecewise* linear, then this is the weighted average of these constants.\n\n\n#### Examples\n\n\n##### Example: average velocity\n\n\nThe average velocity between times $a < b$, is simply the change in position during the time interval divided by the change in time. In notation, this would be $(x(b) - x(a)) / (b-a)$. If $v(t) = x'(t)$ is the velocity, then by the second part of the fundamental theorem of calculus, we have, in agreement with the definition above, that:\n\n\n\n$$\n\\text{average velocity} = \\frac{x(b) - x(a)}{b-a} = \\frac{1}{b-a} \\int_a^b v(t) dt.\n$$\n\n\nThe average speed is the change in *total* distance over time, which is given by\n\n\n\n$$\n\\text{average speed} = \\frac{1}{b-a} \\int_a^b \\lvert v(t)\\rvert dt.\n$$\n\n\nLet $\\bar{v}$ be the average velocity. Then we have $\\bar{v} \\cdot(b-a) = x(b) - x(a)$, or the change in position can be written as a constant ($\\bar{v}$) times the time, as though we had a constant velocity. This is an old intuition. [Bressoud](http://www.math.harvard.edu/~knill/teaching/math1a_2011/exhibits/bressoud/) comments on the special case known to scholars at Merton College around $1350$ that the distance traveled by an object under uniformly increasing velocity starting at $v_0$ and ending at $v_t$ is equal to the distance traveled by an object with constant velocity of $(v_0 + v_t)/2$.\n\n\n##### Example\n\n\nWhat is the average value of $f(x)=\\sin(x)$ over $[0, \\pi]$?\n\n\n\n$$\n\\text{average} = \\frac{1}{\\pi-0} \\int_0^\\pi \\sin(x) dx = \\frac{1}{\\pi} (-\\cos(x)) \\big|_0^\\pi = \\frac{2}{\\pi}\n$$\n\n\nVisually, we have:\n\n::: {.cell execution_count=4}\n``` {.julia .cell-code}\nplot(sin, 0, pi)\nplot!(x -> 2/pi)\n```\n\n::: {.cell-output .cell-output-display execution_count=5}\n![](mean_value_theorem_files/figure-html/cell-5-output-1.svg){}\n:::\n:::\n\n\n##### Example\n\n\nWhat is the average value of the function $f$ which is $1$ between $[0,3]$, $2$ between $(3,5]$ and $1$ between $(5,6]$?\n\n\nThough not continuous, $f(x)$ is integrable as it contains only jumps. The integral from $[0,6]$ can be computed with geometry: $3\\cdot 3 + 2 \\cdot 2 + 1 \\cdot 1 = 14$. The average then is $14/(6-0) = 7/3$.\n\n\n##### Example\n\n\nWhat is the average value of the function $e^{-x}$ between $0$ and $\\log(2)$?\n\n\n\n$$\n\\begin{align*}\n\\text{average} = \\frac{1}{\\log(2) - 0} \\int_0^{\\log(2)} e^{-x} dx\\\\\n&= \\frac{1}{\\log(2)} (-e^{-x}) \\big|_0^{\\log(2)}\\\\\n&= -\\frac{1}{\\log(2)} (\\frac{1}{2} - 1)\\\\\n&= \\frac{1}{2\\log(2)}.\n\\end{align*}\n$$\n\n\nVisualizing, we have\n\n::: {.cell execution_count=5}\n``` {.julia .cell-code}\nplot(x -> exp(-x), 0, log(2))\nplot!(x -> 1/(2*log(2)))\n```\n\n::: {.cell-output .cell-output-display execution_count=6}\n![](mean_value_theorem_files/figure-html/cell-6-output-1.svg){}\n:::\n:::\n\n\n## The mean value theorem for integrals\n\n\nIf $f(x)$ is assumed integrable, the average value of $f(x)$ is defined, as above. Re-expressing gives that there exists a $K$ with\n\n\n\n$$\nK \\cdot (b-a) = \\int_a^b f(x) dx.\n$$\n\n\nWhen we assume that $f(x)$ is continuous, we can describe $K$ as a value in the range of $f$:\n\n\n> **The mean value theorem for integrals**: Let $f(x)$ be a continuous function on $[a,b]$ with $a < b$. Then there exists $c$ with $a \\leq c \\leq b$ with\n>\n> $f(c) \\cdot (b-a) = \\int_a^b f(x) dx.$`\n\n\n\nThe proof comes from the intermediate value theorem and the extreme value theorem. Since $f$ is continuous on a closed interval, there exists values $m$ and $M$ with $f(c_m) = m \\leq f(x) \\leq M=f(c_M)$, for some $c_m$ and $c_M$ in the interval $[a,b]$. Since $m \\leq f(x) \\leq M$, we must have:\n\n\n\n$$\nm \\cdot (b-a) \\leq K\\cdot(b-a) \\leq M\\cdot(b-a).\n$$\n\n\nSo in particular $K$ is in $[m, M]$. But $m$ and $M$ correspond to values of $f(x)$, so by the intermediate value theorem, $K=f(c)$ for some $c$ that must lie in between $c_m$ and $c_M$, which means as well that it must be in $[a,b]$.\n\n\n##### Proof of second part of Fundamental Theorem of Calculus\n\n\nThe mean value theorem is exactly what is needed to prove formally the second part of the Fundamental Theorem of Calculus. Again, suppose $f(x)$ is continuous on $[a,b]$ with $a < b$. For any $a < x < b$, we define $F(x) = \\int_a^x f(u) du$. Then the derivative of $F$ exists and is $f$.\n\n\nLet $h>0$. Then consider the forward difference $(F(x+h) - F(x))/h$. Rewriting gives:\n\n\n\n$$\n\\frac{\\int_a^{Line truncated
"supporting": [
"mean_value_theorem_files"
],
"filters": [],
"includes": {
"include-in-header": [
"<script src=\"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\" integrity=\"sha512-c3Nl8+7g4LMSTdrm621y7kf9v3SDPnhxLNhcjFJbKECVnmZHTdo+IRO05sNLTH/D3vA6u1X32ehoLC7WFVdheg==\" crossorigin=\"anonymous\"></script>\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js\" integrity=\"sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==\" crossorigin=\"anonymous\"></script>\n<script type=\"application/javascript\">define('jquery', [],function() {return window.jQuery;})</script>\n"
]
}
}
}