align fix; theorem style; condition number

This commit is contained in:
jverzani
2024-10-31 14:22:21 -04:00
parent 3e7e3a9727
commit 18aae2aa93
61 changed files with 1705 additions and 819 deletions

View File

@@ -41,13 +41,14 @@ $$
So,
$$
\begin{align*}
\int_a^b g(u(t)) \cdot u'(t) dt &= \int_a^b (G \circ u)'(t) dt\\
&= (G\circ u)(b) - (G\circ u)(a) \quad\text{(the FTC, part II)}\\
&= G(u(b)) - G(u(a)) \\
&= \int_{u(a)}^{u(b)} g(x) dx. \quad\text{(the FTC part II)}
\end{align*}
$$
That is, this substitution formula applies:
@@ -181,7 +182,7 @@ when $-1 \leq x \leq 1$ and $0$ otherwise. The area under $f$ is just $1$ - the
Let $u(x) = (x-c)/h$ and $g(x) = (1/h) \cdot f(u(x))$. Then, as $du = 1/h dx$
$$
\begin{align*}
\int_{c-h}^{c+h} g(x) dx
&= \int_{c-h}^{c+h} \frac{1}{h} f(u(x)) dx\\
@@ -189,6 +190,7 @@ Let $u(x) = (x-c)/h$ and $g(x) = (1/h) \cdot f(u(x))$. Then, as $du = 1/h dx$
&= \int_{-1}^1 f(u) du\\
&= 1.
\end{align*}
$$
So the area of this transformed function is still $1$. The shifting by $c$ we know doesn't effect the area, the scaling by $h$ inside of $f$ does, but is balanced out by the multiplication by $1/h$ outside of $f$.
@@ -248,13 +250,14 @@ $$
But $u^3/3 - 4u/3 = (1/3) \cdot u(u-2)(u+2)$, so between $-2$ and $0$ it is positive and between $0$ and $1$ negative, so this integral is:
$$
\begin{align*}
\int_{-2}^0 (u^3/3 - 4u/3 ) du + \int_{0}^1 -(u^3/3 - 4u/3) du
&= (\frac{u^4}{12} - \frac{4}{3}\frac{u^2}{2}) \big|_{-2}^0 - (\frac{u^4}{12} - \frac{4}{3}\frac{u^2}{2}) \big|_{0}^1\\
&= \frac{4}{3} - -\frac{7}{12}\\
&= \frac{23}{12}.
\end{align*}
$$
##### Example
@@ -270,13 +273,14 @@ $$
Integrals involving this function are typically transformed by substitution. For example:
$$
\begin{align*}
\int_a^b f(x; \mu, \sigma) dx
&= \int_a^b \frac{1}{\sqrt{2\pi}}\frac{1}{\sigma} \exp(-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2) dx \\
&= \int_{u(a)}^{u(b)} \frac{1}{\sqrt{2\pi}} \exp(-\frac{1}{2}u^2) du \\
&= \int_{u(a)}^{u(b)} f(u; 0, 1) du,
\end{align*}
$$
where $u = (x-\mu)/\sigma$, so $du = (1/\sigma) dx$.
@@ -295,12 +299,13 @@ $$
A further change of variables by $t = u/\sqrt{2}$ (with $\sqrt{2}dt = du$) gives:
$$
\begin{align*}
\int_a^b f(x; \mu, \sigma) dx &=
\int_{t(u(a))}^{t(u(b))} \frac{\sqrt{2}}{\sqrt{2\pi}} \exp(-t^2) dt\\
&= \frac{1}{2} \int_{t(u(a))}^{t(u(b))} \frac{2}{\sqrt{\pi}} \exp(-t^2) dt
\end{align*}
$$
Up to a factor of $1/2$ this is `erf`.
@@ -309,13 +314,14 @@ Up to a factor of $1/2$ this is `erf`.
So we would have, for example, with $\mu=1$,$\sigma=2$ and $a=1$ and $b=3$ that:
$$
\begin{align*}
t(u(a)) &= (1 - 1)/2/\sqrt{2} = 0\\
t(u(b)) &= (3 - 1)/2/\sqrt{2} = \frac{1}{\sqrt{2}}\\
\int_1^3 f(x; 1, 2)
&= \frac{1}{2} \int_0^{1/\sqrt{2}} \frac{2}{\sqrt{\pi}} \exp(-t^2) dt.
\end{align*}
$$
Or
@@ -488,7 +494,7 @@ integrate(1 / (a^2 + (b*x)^2), x)
The expression $1-x^2$ can be attacked by the substitution $\sin(u) =x$ as then $1-x^2 = 1-\sin(u)^2 = \cos(u)^2$. Here we see this substitution being used successfully:
$$
\begin{align*}
\int \frac{1}{\sqrt{9 - x^2}} dx &= \int \frac{1}{\sqrt{9 - (3\sin(u))^2}} \cdot 3\cos(u) du\\
&=\int \frac{1}{3\sqrt{1 - \sin(u)^2}}\cdot3\cos(u) du \\
@@ -496,6 +502,7 @@ The expression $1-x^2$ can be attacked by the substitution $\sin(u) =x$ as then
&= u \\
&= \sin^{-1}(x/3).
\end{align*}
$$
Further substitution allows the following integral to be solved for an antiderivative:
@@ -513,23 +520,25 @@ integrate(1 / sqrt(a^2 - b^2*x^2), x)
The expression $x^2 - 1$ is a bit different, this lends itself to $\sec(u) = x$ for a substitution, for $\sec(u)^2 - 1 = \tan(u)^2$. For example, we try $\sec(u) = x$ to integrate:
$$
\begin{align*}
\int \frac{1}{\sqrt{x^2 - 1}} dx &= \int \frac{1}{\sqrt{\sec(u)^2 - 1}} \cdot \sec(u)\tan(u) du\\
&=\int \frac{1}{\tan(u)}\sec(u)\tan(u) du\\
&= \int \sec(u) du.
\end{align*}
$$
This doesn't seem that helpful, but the antiderivative to $\sec(u)$ is $\log\lvert (\sec(u) + \tan(u))\rvert$, so we can proceed to get:
$$
\begin{align*}
\int \frac{1}{\sqrt{x^2 - 1}} dx &= \int \sec(u) du\\
&= \log\lvert (\sec(u) + \tan(u))\rvert\\
&= \log\lvert x + \sqrt{x^2-1} \rvert.
\end{align*}
$$
SymPy gives a different representation using the arccosine:
@@ -566,13 +575,14 @@ $$
The identify $\cos(u)^2 = (1 + \cos(2u))/2$ makes this tractable:
$$
\begin{align*}
4ab \int \cos(u)^2 du
&= 4ab\int_0^{\pi/2}(\frac{1}{2} + \frac{\cos(2u)}{2}) du\\
&= 4ab(\frac{1}{2}u + \frac{\sin(2u)}{4})\big|_0^{\pi/2}\\
&= 4ab (\pi/4 + 0) = \pi ab.
\end{align*}
$$
Keeping in mind that that a circle with radius $a$ is an ellipse with $b=a$, we see that this gives the correct answer for a circle.