use quarto, not Pluto to render pages

This commit is contained in:
jverzani
2022-07-24 16:38:24 -04:00
parent 93c993206a
commit 7b37ca828c
879 changed files with 793311 additions and 2678 deletions

View File

@@ -45,9 +45,9 @@ equal can also be represented with the Unicode `≤` (generated by
`\le[tab]`). Similarly, for greater than or equal, there is
`\ge[tab]`.
```julia; echo=false;
alert("The use of `==` is necessary, as `=` is used for assignment and mutation.")
```
!!! warning
The use of `==` is necessary, as `=` is used for assignment and mutation.")
The `!` operator takes a boolean value and negates it. It uses prefix notation:
@@ -80,9 +80,9 @@ a < b, a + c < b + c
Trying other choices will show that the two answers are either both `false` or both `true`.
```julia; echo=false;
alert(""" Well, almost... When `Inf` or `NaN` are involved, this may not hold, for example `1 + Inf < 2 + Inf` is actually `false`. As would be `1 + (typemax(1)-1) < 2 + (typemax(1)-1)`.""")
```
!!! warning
Well, almost... When `Inf` or `NaN` are involved, this may not hold, for example `1 + Inf < 2 + Inf` is actually `false`. As would be `1 + (typemax(1)-1) < 2 + (typemax(1)-1)`.
So adding or subtracting most any finite value from an inequality will preserve the inequality, just as it does for equations.
@@ -131,7 +131,7 @@ In summary we investigated numerically that the following hold:
- `a < b` if and only if `1/a > 1/b` for all finite, positive `a` and `b`.
#### Examples
### Examples
We now show some inequalities highlighted on this [Wikipedia](http://en.wikipedia.org/wiki/Inequality_%28mathematics%29) page.
@@ -337,8 +337,8 @@ choices = [
"`e^pi` is equal to `pi^e`",
"`e^pi` is less than `pi^e`"
]
ans = 1
radioq(choices, ans)
answ = 1
radioq(choices, answ)
```
###### Question
@@ -346,8 +346,8 @@ radioq(choices, ans)
Is $\sin(1000)$ positive?
```julia; hold=true; echo=false;
ans = (sin(1000) > 0)
yesnoq(ans)
answ = (sin(1000) > 0)
yesnoq(answ)
```
###### Question
@@ -359,8 +359,8 @@ choices = [
"``-1/a < -1/b``",
"``-1/a > -1/b``",
raw"``-1/a \geq -1/b``"]
ans = 3
radioq(choices, ans)
answ = 3
radioq(choices, answ)
```
@@ -372,8 +372,8 @@ Suppose you know $a < 0 < b$, is it true that $1/a > 1/b$?
choices = ["Yes, it is always true.",
"It can sometimes be true, though not always.",
L"It is never true, as $1/a$ is negative and $1/b$ is positive"]
ans = 3
radioq(choices, ans)
answ = 3
radioq(choices, answ)
```
###### Question
@@ -394,8 +394,8 @@ $x$. Which of these indicates the first negative value : `airyai(-1) <0`,
```julia; hold=true; echo=false;
choices = ["`airyai($i) < 0`" for i in -1:-1:-5]
ans = 3
radioq(choices, ans, keep_order=true)
answ = 3
radioq(choices, answ, keep_order=true)
```
###### Question
@@ -406,8 +406,8 @@ By trying three different values of $x > 0$ which of these could possibly be alw
choices = ["`x^x <= (1/e)^(1/e)`",
"`x^x == (1/e)^(1/e)`",
"`x^x >= (1/e)^(1/e)`"]
ans = 3
radioq(choices, ans)
answ = 3
radioq(choices, answ)
```
###### Question
@@ -420,8 +420,8 @@ when $x,y > 0$ and $0 < p < 1$:
choices = ["`(x+y)^p < x^p + y^p`",
"`(x+y)^p == x^p + y^p`",
"`(x+y)^p > x^p + y^p`"]
ans = 1
radioq(choices, ans)
answ = 1
radioq(choices, answ)
```
@@ -436,8 +436,8 @@ JSTOR, AMM, Vol.97, No.1, 1990). Which one?
choices = ["`a^a + b^b <= a^b + b^a`",
"`a^a + b^b >= a^b + b^a`",
"`a^b + b^a <= 1`"]
ans = 2
radioq(choices, ans)
answ = 2
radioq(choices, answ)
```
@@ -457,8 +457,8 @@ Which of the following is equivalent to $\lvert x - a\rvert > b$:
choices = [raw"``-b < x - a < b``",
raw"`` -b < x-a \text{ and } x - a < b``",
raw"``x - a < -b \text{ or } x - a > b``"]
ans = 3
radioq(choices, ans)
answ = 3
radioq(choices, answ)
```
@@ -494,8 +494,8 @@ Which of these will show DeMorgan's law holds when both values are `false`:
choices = ["`!(false && false) == (!false && !false)`",
"`!(false && false) == (false || false)`",
"`!(false && false) == (!false || !false)`"]
ans = 3
radioq(choices, ans)
answ = 3
radioq(choices, answ)
```
###### Question
@@ -505,8 +505,8 @@ For floating point numbers there are two special values `Inf` and `NaN`. For whi
```julia; hold=true; echo=false;
choices = ["`Inf < 3.0` and `3.0 <= Inf`",
"`NaN < 3.0` and `3.0 <= NaN`"]
ans = 2
radioq(choices, ans)
answ = 2
radioq(choices, answ)
```
###### Question
@@ -542,8 +542,8 @@ choices = ["""
In the manual we can read that "In the expression `a || b`, the subexpression `b` is only evaluated if `a` evaluates to false." In this case `a` is `true` and so `a` is returned.
""",
"Since the second value is \"`missing`\", only the first is used. So `false || missing` would also be `false`"]
ans = 1
radioq(choices, ans)
answ = 1
radioq(choices, answ)
```
The value for `true && missing` is `missing`, not a boolean value. What happens?
@@ -553,6 +553,6 @@ choices = ["""
In the manual we can read that "In the expression `a && b`, the subexpression `b` is only evaluated if `a` evaluates to true." In this case, `a` is `false` so `b` is evaluated and returned. As `b` is just `missing` that is the return value.
""",
"Since the second value is \"`missing`\" all such answers would be missing."]
ans = 1
radioq(choices, ans)
answ = 1
radioq(choices, answ)
```