This commit is contained in:
jverzani 2023-04-21 09:38:17 -04:00
commit 8210c27844

View File

@ -177,7 +177,7 @@ To make things more precise, we begin by discussing the limit of a univariate fu
Informally, if a limit exists it is the value that $f(x)$ gets close to as $x$ gets close to - but not equal to - $c$.
The modern formulation is due to Weirstrass:
The modern formulation is due to Weierstrass:
> The limit of $f(x)$ as $x$ approaches $c$ is $L$ if for every real $\epsilon > 0$, there exists a real $\delta > 0$ such that for all real $x$, $0 < \lvert x c \rvert < \delta$ implies $\lvert f(x) L \rvert < \epsilon$. The notation used is $\lim_{x \rightarrow c}f(x) = L$.
@ -264,7 +264,7 @@ This progression can be seen to be increasing. Cauchy, in his treatise, can see
\begin{align*}
(1 + \frac{1}{m})^n &= 1 + \frac{1}{1} + \frac{1}{1\cdot 2}(1 = \frac{1}{m}) + \\
(1 + \frac{1}{m})^n &= 1 + \frac{1}{1} + \frac{1}{1\cdot 2}(1 - \frac{1}{m}) + \\
& \frac{1}{1\cdot 2\cdot 3}(1 - \frac{1}{m})(1 - \frac{2}{m}) + \cdots \\
&+
\frac{1}{1 \cdot 2 \cdot \cdots \cdot m}(1 - \frac{1}{m}) \cdot \cdots \cdot (1 - \frac{m-1}{m}).
@ -322,7 +322,7 @@ x = 0
sin(x) / x
```
The above is really just a heuristic. For some functions this is just not true. For example, the $f(x) = \sqrt{x}$ is only defined on $[0, \infty)$ There is technically no limit at $0$, per se, as the function is not defined around $0$. Other functions jump at values, and will not have a limit, despite having well defined values. The `floor` function is the function that rounds down to the nearest integer. At integer values there will be a jump (and hence have no limit), even though the function is defined.
The above is really just a heuristic. For some functions this is just not true. For example, the $f(x) = \sqrt{x}$ is only defined on $[0, \infty)$. There is technically no limit at $0$, per se, as the function is not defined around $0$. Other functions jump at values, and will not have a limit, despite having well defined values. The `floor` function is the function that rounds down to the nearest integer. At integer values there will be a jump (and hence have no limit), even though the function is defined.
## Graphical approaches to limits
@ -668,14 +668,14 @@ f(x) = (1 - cos(x)) / x^2
extrapolate(f, 1)
```
To find limits at a value of `c` not equal to `0`, we set the `x_0` argument. For example,
To find limits at a value of `c` not equal to `0`, we set the `x0` argument. For example,
```{julia}
#| hold: true
f(x) = (sqrt(x) - 5) / (sqrt(x-16) - 3)
c = 25
extrapolate(f, 26, x0=25)
extrapolate(f, 1, x0=25)
```
This value can also be `Inf`, in anticipation of infinite limits to be discussed in a subsequent section:
@ -735,7 +735,7 @@ Find the [limits](http://en.wikipedia.org/wiki/L%27H%C3%B4pital%27s_rule):
$$
\lim_{x \rightarrow 0} \frac{2\sin(x) - \sin(2x)}{x - \sin(x)}, \quad
\lim_{x \rightarrow 0} \frac{e^x - 1 - x}{x^2}, \quad
\lim_{\rho \rightarrow 0} \frac{x^{1-\rho} - 1}{1 - \rho}.
\lim_{\rho \rightarrow 1} \frac{x^{1-\rho} - 1}{1 - \rho}.
$$
We have for the first:
@ -762,7 +762,7 @@ Finally, for the third we define a new variable and proceed:
limit( (x^(1-rho) - 1) / (1 - rho), rho => 1)
```
This last limit demonstrates that the `limit` function of `SymPy` can readily evaluate limits that involve parameters, though at times some assumptions on the parameters may be needed, as was done through `rho::real`
This last limit demonstrates that the `limit` function of `SymPy` can readily evaluate limits that involve parameters, though at times some assumptions on the parameters may be needed, as was done through `rho::real`.
However, for some cases, the assumptions will not be enough, as they are broad. (E.g., something might be true for some values of the parameter and not others and these values aren't captured in the assumptions.) So the user must be mindful that when parameters are involved, the answer may not reflect all possible cases.
@ -817,7 +817,7 @@ limit(f(x), x => PI/2)
##### Example: left and right limits
Right and left limits will be discussed in the next section; here we give an example of the idea. The mathematical convention is to say a limit exists if both the left *and* right limits exist and are equal. Informally a right (left) limit at $c$ only considers values of $x$ less (more) than $c$. The `limit` function of `SymPy` finds directional limits by default, a right limit, where $x > c$.
Right and left limits will be discussed in the next section; here we give an example of the idea. The mathematical convention is to say a limit exists if both the left *and* right limits exist and are equal. Informally a right (left) limit at $c$ only considers values of $x$ more (less) than $c$. The `limit` function of `SymPy` finds directional limits by default, a right limit, where $x > c$.
The left limit can be found by passing the argument `dir="-"`. Passing `dir="+-"` (and not `"-+"`) will compute the mathematical limit, throwing an error in `Python` if no limit exists.
@ -857,7 +857,7 @@ These are verbally described as follows, when the individual limits exist and ar
* Limits involving sums, differences or scalar multiples of functions *exist* **and** can be **computed** by first doing the individual limits and then combining the answers appropriately.
* Limits of products exist and can be found by computing the limits of the individual factors and then combining.
* Limits of ratios *exist* and can be found by computing the limit of the individual terms and then dividing **provided** you don't divide by $0$. The last part is really important, as this rule is no help with the common indeterminate form $0/0$
* Limits of ratios *exist* and can be found by computing the limit of the individual terms and then dividing **provided** you don't divide by $0$. The last part is really important, as this rule is no help with the common indeterminate form $0/0$.
In addition, consider the composition:
@ -897,7 +897,7 @@ $$
\lim_{x \rightarrow 0} \frac{\sin(kx)}{x}.
$$
This is clearly related to the function $f(x) = \sin(x)/x$, which has a limit of $1$ as $x \rightarrow 0$. We see $g(x) = k f(kx)$ is the limit in question. As $kx \rightarrow 0$, though not taking a value of $0$ except when $x=0$, the limit above is $k \lim_{x \rightarrow 0} f(kx) = k \lim_{u \rightarrow 0} f(u) = 1$.
This is clearly related to the function $f(x) = \sin(x)/x$, which has a limit of $1$ as $x \rightarrow 0$. We see $g(x) = k f(kx)$ is the limit in question. As $kx \rightarrow 0$, though not taking a value of $0$ except when $x=0$, the limit above is $k \lim_{x \rightarrow 0} f(kx) = k \lim_{u \rightarrow 0} f(u) = k$.
Basically when taking a limit as $x$ goes to $0$ we can multiply $x$ by any constant and figure out the limit for that. (It is as though we "go to" $0$ faster or slower. but are still going to $0$.
@ -910,7 +910,7 @@ $$
\lim_{x \rightarrow 0} \frac{\sin(x^2)}{x^2} = 1,
$$
as this is the limit of $f(g(x))$ with $f$ as above and $g(x) = x^2$. We need $x \rightarrow 0$, $g$is only $0$ at $x=0$, which is the case.
as this is the limit of $f(g(x))$ with $f$ as above and $g(x) = x^2$. We need $x \rightarrow 0$, $g$ is only $0$ at $x=0$, which is the case.
##### Example: products
@ -1023,7 +1023,7 @@ gif(anim, imgfile, fps = 1)
caption = """
As ``x`` goes to ``0``, the values of ``sin(x)/x`` are squeezed between ``\\cos(x)`` and ``1`` which both converge to ``1``.
As ``x`` goes to ``0``, the values of ``\\sin(x)/x`` are squeezed between ``\\cos(x)`` and ``1`` which both converge to ``1``.
"""
ImageFile(imgfile, caption)
```
@ -1467,7 +1467,9 @@ $$
We have $\lim_{x\rightarrow 0}f(x) = 0$, as $0$ is clearly a removable discontinuity. So were the above applicable we would have $\lim_{x \rightarrow 0}f(f(x)) = 0$. But this is not true. What is the limit at $0$ of $f(f(x))$?
```{julia, echo=false}
```{julia}
#| hold: true
#| echo: false
numericq(1)
```
@ -1525,7 +1527,7 @@ $$
#| hold: true
#| echo: false
f(x) = 1/PI * cos(PI*x)/(1 - (2x)^2)
val = N(limit(f(x), x => 1//2))
val = convert(Float64, N(limit(f(x), x => 1//2)))
numericq(val)
```
@ -1543,7 +1545,7 @@ $$
#| hold: true
#| echo: false
f(x) = (x * sin(sin(x))- sin(x)^2)/x^6
val = N(limit(f(x), x => 0))
val = convert(Float64, N(limit(f(x), x => 0)))
numericq(val)
```
@ -1620,7 +1622,7 @@ $$
#| hold: true
#| echo: false
choices = ["``m/n``", "``n/m``", "``mn``", "The limit does not exist"]
radioq(choices, 1)
radioq(choices, 2)
```
###### Question
@ -1649,7 +1651,9 @@ Should `SymPy` have needed an assumption like
@syms a::postive
```
```{julia, echo=false}
```{julia}
#| hold: true
#| echo: false
yesnoq("yes")
```