Update rational_functions.qmd
some typos.
This commit is contained in:
parent
c1c0188fc4
commit
98b22bcc08
@ -239,7 +239,7 @@ bottom = x-1
|
||||
quo, rem = divrem(top, bottom)
|
||||
```
|
||||
|
||||
The graph of has nothing in common with the graph of the quotient for small $x$
|
||||
The graph has nothing in common with the graph of the quotient for small $x$
|
||||
|
||||
|
||||
```{julia}
|
||||
@ -265,7 +265,7 @@ $$
|
||||
\frac{(x-2)^3\cdot(x-4)\cdot(x-3)}{(x-5)^4 \cdot (x-6)^2}.
|
||||
$$
|
||||
|
||||
By looking at the powers we can see that the leading term of the numerator will the $x^5$ and the leading term of the denominator $x^6$. The ratio is $1/x^1$. As such, we expect the $y$-axis as a horizontal asymptote:
|
||||
By looking at the powers we can see that the leading term of the numerator will the $x^5$ and the leading term of the denominator $x^6$. The ratio is $1/x^1$. As such, we expect the $x$-axis as a horizontal asymptote:
|
||||
|
||||
|
||||
#### Partial fractions
|
||||
@ -378,7 +378,7 @@ plot(𝒇, -5, 5, ylims=(-20, 20))
|
||||
This isn't ideal, as the large values are still computed, just the viewing window is clipped. This leaves the vertical asymptotes still effecting the graph.
|
||||
|
||||
|
||||
There is another way, we could ask `Julia` to not plot $y$ values that get too large. This is not a big request. If instead of the value of `f(x)` - when it is large - -we use `NaN` instead, then the connect-the-dots algorithm will skip those values.
|
||||
There is another way, we could ask `Julia` to not plot $y$ values that get too large. This is not a big request. If instead of the value of `f(x)` - when it is large - we use `NaN` instead, then the connect-the-dots algorithm will skip those values.
|
||||
|
||||
|
||||
This was discussed in an earlier section where the `rangeclamp` function was introduced to replace large values of `f(x)` (in absolute values) with `NaN`.
|
||||
@ -621,7 +621,7 @@ a, b = 4, 6
|
||||
pq = 𝐩 // one(𝐩)
|
||||
x = variable(pq)
|
||||
d = Polynomials.degree(𝐩)
|
||||
numerator(lowest_terms( (x + 1)^2 * pq((a*x + b)/(x + 1))))
|
||||
numerator(lowest_terms( (x + 1)^d * pq((a*x + b)/(x + 1))))
|
||||
```
|
||||
|
||||
---
|
||||
@ -630,7 +630,7 @@ numerator(lowest_terms( (x + 1)^2 * pq((a*x + b)/(x + 1))))
|
||||
Now, why is this of any interest?
|
||||
|
||||
|
||||
Mobius transforms are used to map regions into other regions. In this special case, the transform $\phi(x) = (ax + b)/(x + 1)$ takes the interval $[0,\infty]$ and sends it to $[a,b]$ ($0$ goes to $(a\cdot 0 + b)/(0+1) = b$, whereas $\infty$ goes to $ax/x \rightarrow a$). Using this, if $p(u) = 0$, with $q(x) = (x-1)^d p(\phi(x))$, then setting $u = \phi(x)$ we have $q(x) = (\phi^{-1}(u)+1)^d p(\phi(\phi^{-1}(u))) = (\phi^{-1}(u)+1)^d \cdot p(u) = (\phi^{-1}(u)+1)^d \cdot 0 = 0$. That is, a zero of $p$ in $[a,b]$ will appear as a zero of $q$ in $[0,\infty)$ at $\phi^{-1}(u)$.
|
||||
Mobius transforms are used to map regions into other regions. In this special case, the transform $\phi(x) = (ax + b)/(x + 1)$ takes the interval $[0,\infty]$ and sends it to $[a,b]$ ($0$ goes to $(a\cdot 0 + b)/(0+1) = b$, whereas $\infty$ goes to $ax/x \rightarrow a$). Using this, if $p(u) = 0$, with $q(x) = (x+1)^d p(\phi(x))$, then setting $u = \phi(x)$ we have $q(x) = (\phi^{-1}(u)+1)^d p(\phi(\phi^{-1}(u))) = (\phi^{-1}(u)+1)^d \cdot p(u) = (\phi^{-1}(u)+1)^d \cdot 0 = 0$. That is, a zero of $p$ in $[a,b]$ will appear as a zero of $q$ in $[0,\infty)$ at $\phi^{-1}(u)$.
|
||||
|
||||
|
||||
The Descartes rule of signs applied to $q$ then will give a bound on the number of possible roots of $p$ in the interval $[a,b]$. In the example we did, the Mobius transform for $a=4, b=6$ is $15 - x - 11x^2 - 3x^3$ with $1$ sign change, so there must be exactly $1$ real root of $p=(x-1)(x-3)(x-5)$ in the interval $[4,6]$, as we can observe from the factored form of $p$.
|
||||
@ -640,7 +640,8 @@ Similarly, we can see there are $2$ or $0$ roots for $p$ in the interval $[2,6]$
|
||||
|
||||
|
||||
```{julia}
|
||||
mobius_transformation(𝐩, 2,6)
|
||||
p = fromroots([1,3,5]) # (x-1)⋅(x-3)⋅(x-5) = -15 + 23*x - 9*x^2 + x^3
|
||||
mobius_transformation(p, 2,6)
|
||||
```
|
||||
|
||||
This observation, along with a detailed analysis provided by [Kobel, Rouillier, and Sagraloff](https://dl.acm.org/doi/10.1145/2930889.2930937) provides a means to find intervals that enclose the real roots of a polynomial.
|
||||
@ -662,7 +663,6 @@ Applying these steps to $p$ with an initial interval, say $[0,9]$, we would have
|
||||
|
||||
```{julia}
|
||||
#| hold: true
|
||||
p = fromroots([1,3,5]) # (x-1)⋅(x-3)⋅(x-5) = -15 + 23*x - 9*x^2 + x^3
|
||||
mobius_transformation(p, 0, 9) # 3
|
||||
mobius_transformation(p, 0, 9//2) # 2
|
||||
mobius_transformation(p, 9//2, 9) # 1 (and done)
|
||||
|
Loading…
Reference in New Issue
Block a user