many edits

This commit is contained in:
jverzani
2024-04-26 18:26:12 -04:00
parent 6e807edb46
commit 4f924557ad
45 changed files with 326 additions and 296 deletions

View File

@@ -229,7 +229,7 @@ Of course, we could have just relied on `limit`, which knows about L'Hospital's
```{julia}
limit(f(x)/g(x), x, a)
limit(f(x)/g(x), x => a)
```
## Idea behind L'Hospital's rule
@@ -272,13 +272,13 @@ function lhopitals_picture_graph(n)
plt
end
caption = L"""
Geometric interpretation of ``L=\lim_{x \rightarrow 0} x^2 / (\sqrt{1 +
x} - 1 - x^2)``. At ``0`` this limit is indeterminate of the form
caption = raw"""
Geometric interpretation of
``L=\lim_{x \rightarrow 0} x^2 / (\sqrt{1 + x} - 1 - x^2)``.
At ``0`` this limit is indeterminate of the form
``0/0``. The value for a fixed ``x`` can be seen as the slope of a secant
line of a parametric plot of the two functions, plotted as ``(g,
f)``. In this figure, the limiting "tangent" line has ``0`` slope,
line of a parametric plot of the two functions, plotted as
``(g, f)``. In this figure, the limiting "tangent" line has ``0`` slope,
corresponding to the limit ``L``. In general, L'Hospital's rule is
nothing more than a statement about slopes of tangent lines.
@@ -437,38 +437,38 @@ $$
\lim_{x \rightarrow 1} \frac{x\log(x)-(x-1)}{(x-1)\log(x)}
$$
In `SymPy` we have:
In `SymPy` we have (using italic variable names to avoid a problem with the earlier use of `f` as a function):
```{julia}
𝒇 = x*log(x) - (x-1)
𝒈 = (x-1)*log(x)
𝒇(1), 𝒈(1)
𝑓 = x * log(x) - (x-1)
𝑔 = (x-1) * log(x)
𝑓(1), 𝑔(1)
```
L'Hospital's rule applies to the form $0/0$, so we try:
```{julia}
𝒇 = diff(𝒇, x)
𝒈 = diff(𝒈, x)
𝒇(1), 𝒈(1)
𝑓 = diff(𝑓, x)
𝑔 = diff(𝑔, x)
𝑓(1), 𝑔(1)
```
Again, we get the indeterminate form $0/0$, so we try again with second derivatives:
```{julia}
𝒇 = diff(𝒇, x, x)
𝒈 = diff(𝒈, x, x)
𝒇(1), 𝒈(1)
𝑓 = diff(𝑓, x, x)
𝑔 = diff(𝑔, x, x)
𝑓(1), 𝑔(1)
```
From this we see the limit is $1/2$, as could have been done directly:
```{julia}
limit(𝒇/𝒈, x=>1)
limit(𝑓/𝑔, x=>1)
```
## The assumptions are necessary
@@ -524,7 +524,7 @@ This ratio has no limit, as it oscillates, as confirmed by `SymPy`:
```{julia}
limit(u(x)/v(x), x=> oo)
limit(u(x)/v(x), x => oo)
```
## Questions
@@ -645,8 +645,8 @@ What is $L$?
#| hold: true
#| echo: false
f(x) = (4x - sin(x))/x
L = float(N(limit(f, 0)))
numericq(L)
L = limit(f(x), x=>0)
numericq(float(L))
```
###### Question
@@ -666,8 +666,8 @@ What is $L$?
#| hold: true
#| echo: false
f(x) = (sqrt(1+x) - 1)/x
L = float(N(limit(f, 0)))
numericq(L)
L = limit(f(x), x => 0)
numericq(float(L))
```
###### Question
@@ -687,8 +687,8 @@ What is $L$?
#| hold: true
#| echo: false
f(x) = (x - sin(x))/x^3
L = float(N(limit(f, 0)))
numericq(L)
L = limit(f(x), x=>0)
numericq(float(L))
```
###### Question
@@ -708,8 +708,8 @@ What is $L$?
#| hold: true
#| echo: false
f(x) = (1 - x^2/2 - cos(x))/x^3
L = float(N(limit(f, 0)))
numericq(L)
L = limit(f(x), x=>0)
numericq(float(L))
```
###### Question
@@ -729,8 +729,8 @@ What is $L$?
#| hold: true
#| echo: false
f(x) = log(log(x))/log(x)
L = N(limit(f(x), x=> oo))
numericq(L)
L = limit(f(x), x=> oo)
numericq(float(L))
```
###### Question
@@ -750,8 +750,8 @@ What is $L$?
#| hold: true
#| echo: false
f(x) = 1/x - 1/sin(x)
L = float(N(limit(f, 0)))
numericq(L)
L = limit(f(x), x => 0)
numericq(float(L))
```
###### Question
@@ -770,8 +770,8 @@ What is $L$?
```{julia}
#| hold: true
#| echo: false
L = float(N(limit(log(x)/x, x=>oo)))
numericq(L)
L = limit(log(x)/x, x=>oo)
numericq(float(L))
```
###### Question