This commit is contained in:
jverzani
2024-05-21 20:58:53 -04:00
parent aa535e19fb
commit 4f16050253
4 changed files with 447 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ A parallel definition with $a < b$ implying $f(a) > f(b)$ would be used for a *s
We can try and prove these properties for a function algebraically we'll see both are related to the zeros of some function. However, before proceeding to that it is usually helpful to get an idea of where the answer is using exploratory graphs.
We will use a helper function, `plotif(f, g, a, b)` that plots the function `f` over `[a,b]` coloring it red when `g` is positive (and blue otherwise). Such a function is defined for us in the accompanying `CalculusWithJulia` package, which has been previously been loaded.
We will use a helper function, `plotif(f, g, a, b)` that plots the function `f` over `[a,b]` highlighting the regions in the domain when `g` is non-negative. Such a function is defined for us in the accompanying `CalculusWithJulia` package, which has been previously been loaded.
To see where a function is positive, we simply pass the function object in for *both* `f` and `g` above. For example, let's look at where $f(x) = \sin(x)$ is positive:
@@ -106,7 +106,7 @@ The mean value theorem provides the reasoning behind the first statement: on $I$
The second part, follows from the secant line equation. The derivative can be written as a limit of secant-line slopes, each of which is positive. The limit of positive things can only be non-negative, though there is no guarantee the limit will be positive.
So, to visualize where a function is increasing, we can just pass in the derivative as the masking function in our `plotif` function, as long as we are wary about places with $0$ derivative (flat spots).
So, to visualize where a function is increasing or flat, we can just pass in the derivative as the masking function in our `plotif` function.
For example, here, with a more complicated function, the intervals where the function is increasing are highlighted by passing in the functions derivative to `plotif`: