update mean_value_theorem.qmd

some typos.
This commit is contained in:
Fang Liu 2023-05-22 10:12:16 +08:00
parent 8057c4daae
commit 0b2e54258f

View File

@ -76,7 +76,7 @@ plot!(x -> 2/pi)
##### Example
What is the average value of the function $f$ which is $1$ between $[0,3]$, $2$ between $(3,5]$ and $1$ between $(5,6]$?
What is the average value of the function $f$ which is $3$ between $[0,3]$, $2$ between $(3,5]$ and $1$ between $(5,6]$?
Though 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$.
@ -185,7 +185,7 @@ Between $0$ and $2$ a function is constantly $1$. Between $2$ and $3$ the functi
#| hold: true
#| echo: false
f(x) = x < 2 ? 1.0 : 2.0
a, b= 0, 2
a, b= 0, 3
val, _ = quadgk(f, a, b)
numericq(val/(b-a))
```