make pdf file generation work

This commit is contained in:
jverzani
2022-10-10 14:28:05 -04:00
parent a0b913eed8
commit a9ca131870
59 changed files with 884 additions and 1330 deletions

View File

@@ -44,13 +44,13 @@ annotate!([(.75, .25, "θ"), (4.0, 1.25, "opposite"), (2, -.25, "adjacent"), (1.
With these, the basic definitions for the primary trigonometric functions are
$$
\begin{align*}
\sin(\theta) &= \frac{\text{opposite}}{\text{hypotenuse}} &\quad(\text{the sine function})\\
\cos(\theta) &= \frac{\text{adjacent}}{\text{hypotenuse}} &\quad(\text{the cosine function})\\
\tan(\theta) &= \frac{\text{opposite}}{\text{adjacent}}. &\quad(\text{the tangent function})
\end{align*}
$$
:::{.callout-note}
## Note
@@ -119,12 +119,12 @@ Julia has the $6$ basic trigonometric functions defined through the functions `s
Two right triangles - the one with equal, $\pi/4$, angles; and the one with angles $\pi/6$ and $\pi/3$ can have the ratio of their sides computed from basic geometry. In particular, this leads to the following values, which are usually committed to memory:
$$
\begin{align*}
\sin(0) &= 0, \quad \sin(\pi/6) = \frac{1}{2}, \quad \sin(\pi/4) = \frac{\sqrt{2}}{2}, \quad\sin(\pi/3) = \frac{\sqrt{3}}{2},\text{ and } \sin(\pi/2) = 1\\
\cos(0) &= 1, \quad \cos(\pi/6) = \frac{\sqrt{3}}{2}, \quad \cos(\pi/4) = \frac{\sqrt{2}}{2}, \quad\cos(\pi/3) = \frac{1}{2},\text{ and } \cos(\pi/2) = 0.
\end{align*}
$$
Using the circle definition allows these basic values to inform us of values throughout the unit circle.
@@ -360,8 +360,9 @@ As can be seen, even a somewhat simple combination can produce complicated graph
```{julia}
#| echo: false
txt ="""
<iframe width="560" height="315" src="https://www.youtube.com/embed/rrmx2Q3sO1Y" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/rrmx2Q3sO1Y" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
"""
HTMLoutput(txt; centered=true, caption="Julia logo animated")
```
@@ -391,21 +392,24 @@ According to [Wikipedia](https://en.wikipedia.org/wiki/Trigonometric_functions#I
```{julia}
#| echo: false
ImageFile(:precalc, "figures/summary-sum-and-difference-of-two-angles.jpg", "Relations between angles")
# ImageFile(:precalc, "figures/summary-sum-and-difference-of-two-angles.jpg", "Relations between angles")
nothing
```
![Relations between angles](figures/summary-sum-and-difference-of-two-angles.jpg)
To read this, there are three triangles: the bigger (green with pink part) has hypotenuse $1$ (and adjacent and opposite sides that form the hypotenuses of the other two); the next biggest (yellow) hypotenuse $\cos(\beta)$, adjacent side (of angle $\alpha$) $\cos(\beta)\cdot \cos(\alpha)$, and opposite side $\cos(\beta)\cdot\sin(\alpha)$; and the smallest (pink) hypotenuse $\sin(\beta)$, adjacent side (of angle $\alpha$) $\sin(\beta)\cdot \cos(\alpha)$, and opposite side $\sin(\beta)\sin(\alpha)$.
This figure shows the following sum formula for sine and cosine:
$$
\begin{align*}
\sin(\alpha + \beta) &= \sin(\alpha)\cos(\beta) + \cos(\alpha)\sin(\beta), & (\overline{CE} + \overline{DF})\\
\cos(\alpha + \beta) &= \cos(\alpha)\cos(\beta) - \sin(\alpha)\sin(\beta). & (\overline{AC} - \overline{DE})
\end{align*}
$$
Using the fact that $\sin$ is an odd function and $\cos$ an even function, related formulas for the difference $\alpha - \beta$ can be derived.
@@ -413,12 +417,12 @@ Using the fact that $\sin$ is an odd function and $\cos$ an even function, relat
Taking $\alpha = \beta$ we immediately get the "double-angle" formulas:
$$
\begin{align*}
\sin(2\alpha) &= 2\sin(\alpha)\cos(\alpha)\\
\cos(2\alpha) &= \cos(\alpha)^2 - \sin(\alpha)^2.
\end{align*}
$$
The latter looks like the Pythagorean identify, but has a minus sign. In fact, the Pythagorean identify is often used to rewrite this, for example $\cos(2\alpha) = 2\cos(\alpha)^2 - 1$ or $1 - 2\sin(\alpha)^2$.
@@ -432,12 +436,12 @@ Applying the above with $\alpha = \beta/2$, we get that $\cos(\beta) = 2\cos(\be
Consider the expressions $\cos((n+1)\theta)$ and $\cos((n-1)\theta)$. These can be re-expressed as:
$$
\begin{align*}
\cos((n+1)\theta) &= \cos(n\theta + \theta) = \cos(n\theta) \cos(\theta) - \sin(n\theta)\sin(\theta), \text{ and}\\
\cos((n-1)\theta) &= \cos(n\theta - \theta) = \cos(n\theta) \cos(-\theta) - \sin(n\theta)\sin(-\theta).
\end{align*}
$$
But $\cos(-\theta) = \cos(\theta)$, whereas $\sin(-\theta) = -\sin(\theta)$. Using this, we add the two formulas above to get:
@@ -663,12 +667,12 @@ end
These values are more commonly expressed using the exponential function as:
$$
\begin{align*}
\sinh(x) &= \frac{e^x - e^{-x}}{2}\\
\cosh(x) &= \frac{e^x + e^{-x}}{2}.
\end{align*}
$$
The hyperbolic tangent is then the ratio of $\sinh$ and $\cosh$. As well, three inverse hyperbolic functions can be defined.