some typos
This commit is contained in:
parent
ed1d92197a
commit
d55e4802fb
@ -80,7 +80,7 @@ Pluto has a built-in package management system that manages the installation of
|
||||
"Project [Jupyter](https://jupyter.org/) exists to develop open-source software, open-standards, and services for interactive computing across dozens of programming languages." The `IJulia` package allows `Julia` to be one of these programming languages. This package must be installed prior to use.
|
||||
|
||||
|
||||
The Jupyter Project provides two web-based interfaces to `Julia`: the Jupyter notebook and the newer JupyterLab. The [binder](https://mybinder.org/) project use Juptyer notebooks for their primary interface to `Julia`. To use a binder notebook, follow this link:
|
||||
The Jupyter Project provides two web-based interfaces to `Julia`: the Jupyter notebook and the newer JupyterLab. The [binder](https://mybinder.org/) project use Jupyter notebooks for their primary interface to `Julia`. To use a binder notebook, follow this link:
|
||||
|
||||
|
||||
[launch binder](https://mybinder.org/v2/gh/CalculusWithJulia/CwJScratchPad.git/master)
|
||||
|
@ -97,7 +97,7 @@ julia> 2 + 2
|
||||
|
||||
|
||||
* An IDE. For programmers, an integrated development environment is often used to manage bigger projects. `Julia` has `Juno` and `VSCode`.
|
||||
* A notebook. The [Project Juptyer](https://jupyter.org/) provides a notebook interface for interacting with `Julia` and a more `IDE` style `jupyterlab` interface. A jupyter notebook has cells where commands are typed and immediately following is the printed output returned by `Julia`. The output of a cell depends on the state of the kernel when the cell is computed, not the order of the cells in the notebook. Cells have a number attached, showing the execution order. The `Juypter` notebook is used by `binder` and can be used locally through the `IJulia` package. This notebook has the ability to display many different types of outputs in addition to plain text, such as images, marked up math text, etc.
|
||||
* A notebook. The [Project Juptyer](https://jupyter.org/) provides a notebook interface for interacting with `Julia` and a more `IDE` style `jupyterlab` interface. A jupyter notebook has cells where commands are typed and immediately following is the printed output returned by `Julia`. The output of a cell depends on the state of the kernel when the cell is computed, not the order of the cells in the notebook. Cells have a number attached, showing the execution order. The `Jupyter` notebook is used by `binder` and can be used locally through the `IJulia` package. This notebook has the ability to display many different types of outputs in addition to plain text, such as images, marked up math text, etc.
|
||||
* The [Pluto](https://github.com/fonsp/Pluto.jl) package provides a *reactive* notebook interface. Reactive means when one "cell" is modified and executed, the new values cascade to all other dependent cells which in turn are updated. This is very useful for exploring a parameter space, say. Pluto notebooks can be exported as HTML files which make them easy to read online and – by clever design – embed the `.jl` file that can run through `Pluto` if it is downloaded.
|
||||
|
||||
|
||||
|
@ -39,7 +39,7 @@ A *polynomial* is a sum of monomials. After combining terms with same powers, a
|
||||
|
||||
|
||||
$$
|
||||
a_n x^n + a_{n-1}x^{n-1} + \cdots a_1 x + a_0, \quad a_n \neq 0
|
||||
a_n x^n + a_{n-1}x^{n-1} + \cdots + a_1 x + a_0, \quad a_n \neq 0
|
||||
$$
|
||||
|
||||
```{julia}
|
||||
@ -343,7 +343,7 @@ pp = lambdify(p)
|
||||
pp(2)
|
||||
```
|
||||
|
||||
The `lambdify` function uses the name of the similar `SymPy` function which is named after Python's convention of calling anoynmous function "lambdas." The use above is straightforward. Only slightly more complicated is the use when there are multiple symbolic values. For example:
|
||||
The `lambdify` function uses the name of the similar `SymPy` function which is named after Python's convention of calling anonymous function "lambdas." The use above is straightforward. Only slightly more complicated is the use when there are multiple symbolic values. For example:
|
||||
|
||||
|
||||
```{julia}
|
||||
@ -379,7 +379,7 @@ This graph illustrates the key features of polynomial graphs:
|
||||
|
||||
|
||||
* there may be values for `x` where the graph crosses the $x$ axis (real roots of the polynomial);
|
||||
* there may be peaks and valleys (local maxima and local minima)
|
||||
* there may be peaks and valleys (local maxima and local minima);
|
||||
* except for constant polynomials, the ultimate behaviour for large values of $|x|$ is either both sides of the graph going to positive infinity, or negative infinity, or as in this graph one to the positive infinity and one to negative infinity. In particular, there is no *horizontal asymptote*.
|
||||
|
||||
|
||||
@ -513,7 +513,7 @@ This observation is the start of Descartes' rule of [signs](http://sepwww.stanfo
|
||||
Among numerous others, there are two common ways of representing a non-zero polynomial:
|
||||
|
||||
|
||||
* expanded form, as in $a_n x^n + a_{n-1}x^{n-1} + \cdots a_1 x + a_0, a_n \neq 0$; or
|
||||
* expanded form, as in $a_n x^n + a_{n-1}x^{n-1} + \cdots + a_1 x + a_0, a_n \neq 0$; or
|
||||
* factored form, as in $a\cdot(x-r_1)\cdot(x-r_2)\cdots(x-r_n), a \neq 0$.
|
||||
|
||||
|
||||
|
@ -523,7 +523,7 @@ A polynomial with real coefficients may or may not have real roots. The followin
|
||||
The study of polynomial roots is an old one. In $1637$ Descartes published a *simple* method to determine an upper bound on the number of *positive* real roots of a polynomial.
|
||||
|
||||
|
||||
> [Descartes' rule of signs](http://en.wikipedia.org/wiki/Descartes%27_rule_of_signs): if $p=a_n x^n + a_{n-1}x^{n-1} + \cdots a_1x + a_0$ then the number of positive real roots is either equal to the number of sign differences between consecutive nonzero coefficients, or is less than it by an even number. Repeated roots are counted separately.
|
||||
> [Descartes' rule of signs](http://en.wikipedia.org/wiki/Descartes%27_rule_of_signs): if $p=a_n x^n + a_{n-1}x^{n-1} + \cdots + a_1x + a_0$ then the number of positive real roots is either equal to the number of sign differences between consecutive nonzero coefficients, or is less than it by an even number. Repeated roots are counted separately.
|
||||
|
||||
|
||||
|
||||
@ -553,7 +553,7 @@ N.(solve(j ~ 0, x))
|
||||
### Cauchy's bound on the magnitude of the real roots.
|
||||
|
||||
|
||||
Descartes' rule gives a bound on how many real roots there may be. Cauchy provided a bound on how large they can be. Assume our polynomial is monic (if not, divide by $a_n$ to make it so, as this won't effect the roots). Then any real root is no larger in absolute value than $|a_0| + |a_1| + |a_2| + \cdots + |a_n|$, (this is expressed in different ways.)
|
||||
Descartes' rule gives a bound on how many real roots there may be. Cauchy provided a bound on how large they can be. Assume our polynomial is monic (if not, divide by $a_n$ to make it so, as this won't effect the roots). Then any real root is no larger in absolute value than $|a_0| + |a_1| + |a_2| + \cdots + |a_{n-1}| + 1$, (this is expressed in different ways.)
|
||||
|
||||
|
||||
To see precisely [why](https://captainblack.wordpress.com/2009/03/08/cauchys-upper-bound-for-the-roots-of-a-polynomial/) this bound works, suppose $x$ is a root with $|x| > 1$ and let $h$ be the bound. Then since $x$ is a root, we can solve $a_0 + a_1x + \cdots + 1 \cdot x^n = 0$ for $x^n$ as:
|
||||
|
@ -454,18 +454,18 @@ numericq(4)
|
||||
The identification of a collection of coefficients with a polynomial depends on an understood **basis**. A basis for the polynomials of degree $n$ or less, consists of a minimal collection of polynomials for which all the polynomials of degree $n$ or less can be expressed through a combination of sums of terms, each of which is just a coefficient times a basis member. The typical basis is the $n+1$ polynomials $1, x, x^2, \dots, x^n$. However, though every basis must have $n+1$ members, they need not be these.
|
||||
|
||||
|
||||
A basis used by [Lagrange](https://en.wikipedia.org/wiki/Lagrange_polynomial) is the following. Let there be $n+1$ points distinct points $x_0, x_1, \dots, x_n$. For each $i$ in $0$ to $n$ define
|
||||
A basis used by [Lagrange](https://en.wikipedia.org/wiki/Lagrange_polynomial) is the following. Let there be $n+1$ distinct points $x_0, x_1, \dots, x_n$. For each $i$ in $0$ to $n$ define
|
||||
|
||||
|
||||
$$
|
||||
l_i(x) = \prod_{0 \leq j \leq n; j \ne i} \frac{x-x_j}{x_i - x_j} =
|
||||
\frac{(x-x_1)\cdot(x-x_2)\cdot \cdots \cdot (x-x_{i-1}) \cdot (x-x_{i+1}) \cdot \cdots \cdot (x-x_n)}{(x_i-x_1)\cdot(x_i-x_2)\cdot \cdots \cdot (x_i-x_{i-1}) \cdot (x_i-x_{i+1}) \cdot \cdots \cdot (x_i-x_n)}.
|
||||
\frac{(x-x_0)\cdot(x-x_1)\cdot \cdots \cdot (x-x_{i-1}) \cdot (x-x_{i+1}) \cdot \cdots \cdot (x-x_n)}{(x_i-x_0)\cdot(x_i-x_1)\cdot \cdots \cdot (x_i-x_{i-1}) \cdot (x_i-x_{i+1}) \cdot \cdots \cdot (x_i-x_n)}.
|
||||
$$
|
||||
|
||||
That is $l_i(x)$ is a product of terms like $(x-x_j)/(x_i-x_j)$ *except* when $j=i$.
|
||||
|
||||
|
||||
What is is the value of $l_0(x_0)$?
|
||||
What is the value of $l_0(x_0)$?
|
||||
|
||||
|
||||
```{julia}
|
||||
@ -578,7 +578,7 @@ choices = [
|
||||
It is ``0\cdot T_0(x) + 1\cdot T_1(x) + 2\cdot T_2(x) + 3\cdot T_3(x) = 0``
|
||||
"""
|
||||
raw"""
|
||||
It is ``0\cdot T_0(x) + 1\cdot T_1(x) + 2\cdot T_2(x) + 3\cdot T_3(x) = -2 - 8\cdot x + 4\cdot x^2 + 12\cdot x^3```
|
||||
It is ``0\cdot T_0(x) + 1\cdot T_1(x) + 2\cdot T_2(x) + 3\cdot T_3(x) = -2 - 8\cdot x + 4\cdot x^2 + 12\cdot x^3``
|
||||
"""]
|
||||
radioq(choices, 3)
|
||||
```
|
||||
|
@ -159,7 +159,7 @@ Similarly, a plot over $[-100, -10]$ would show decay towards $0$, though in tha
|
||||
We can easily do most of this analysis without needing a computer or algebra. First, we should know the four eventual shapes of a polynomial, that the graph of $y=mx$ is a line with slope $m$, the graph of $y = c$ is a constant line at height $c$, and the graph of $y=c/x^m$, $m > 0$ will decay towards $0$ as $x \rightarrow \pm\infty$. The latter should be clear, as $x^m$ gets big, so its reciprocal goes towards $0$.
|
||||
|
||||
|
||||
The factored form, as $p$ is presented, is a bit hard to work with, rather we use the expanded form, which we get through the `cancel` function
|
||||
The factored form, as $h$ is presented, is a bit hard to work with, rather we use the expanded form, which we get through the `cancel` function
|
||||
|
||||
|
||||
```{julia}
|
||||
@ -179,7 +179,7 @@ The terms $(1 - 4/x + 5/x^2 - 2/x^3)$ and $(1 - 9/x^2)$ go towards $1$ as $x \ri
|
||||
Just by looking at the ratio of the two leading terms, the behaviour as $x \rightarrow \pm \infty$ can be discerned. If this ratio is of:
|
||||
|
||||
|
||||
* the form $c x^m$ with $m > 1$ then the shape will follow the polynomial growth of of the monomial $c x^m$.
|
||||
* the form $c x^m$ with $m > 1$ then the shape will follow the polynomial growth of the monomial $c x^m$.
|
||||
* the form $c x^m$ with $m=1$ then there will be a line with slope $c$ as a *slant asymptote*.
|
||||
* the form $cx^0$ with $m=0$ (or just $c$) then there will be a *horizontal asymptote* $y=c$.
|
||||
* the form $c/x^{m}$ with $m > 0$ then there will be a horizontal asymptote $y=0$, or the $y$ axis.
|
||||
@ -266,7 +266,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 $x$-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
|
||||
|
@ -168,7 +168,7 @@ sin(theta)^2
|
||||
```
|
||||
|
||||
|
||||
These values are floating point approximations, as can be seen clearly in the computation of `sin(pi/2)`, which is mathematically $0$. Symbolic math can be usedby using `PI` for `pi` if exactness matters:
|
||||
These values are floating point approximations, as can be seen clearly in the computation of `cos(pi/2)`, which is mathematically $0$. Symbolic math can be used by using `PI` for `pi` if exactness matters:
|
||||
|
||||
```{julia}
|
||||
cos.([0, PI/6, PI/4, PI/3, PI/2])
|
||||
@ -732,7 +732,7 @@ $$
|
||||
\cos((n+1)\theta) = 2 \cos(\theta) \cos(n\theta) - \cos((n-1)\theta).
|
||||
$$
|
||||
|
||||
Let $T_n(x) = \cos(n \arccos(x))$. Note $T_1(x) = \cos(x)$. By identifying $\theta$ with $\arccos(x)$ for $-1 \leq x \leq 1$, we get a relation between these functions:
|
||||
Let $T_n(x) = \cos(n \arccos(x))$. Note $T_1(x) = x$. By identifying $\theta$ with $\arccos(x)$ for $-1 \leq x \leq 1$, we get a relation between these functions:
|
||||
|
||||
|
||||
$$
|
||||
|
Loading…
x
Reference in New Issue
Block a user