Today I wrote the first piece of music that sounded interesting and good. It's only four bars.
Math Equations
Tuesday, August 12, 2014
Saturday, August 2, 2014
An open question
Is there a nonnegative function \(f\) such that \(\displaystyle\int\limits_0^\infty \cfrac{f(x)}{\int\limits_x^\infty f(y)\; dy} dx\) exists?
Saturday, July 26, 2014
The area of a triangle a, b, c
This week, I encountered the following problem in my textbook: Show that the area of a triangle ABC is given by \(\sqrt{s(s-a)(s-b)(s-c)}\), where \(s = (a+b+c)/2\) is the semi-perimeter of the triangle. I want to share my solution because it shows how you can avoid time-consuming algebra by factoring instead of expanding.
\[\small\begin{array}{l}
A = \sqrt{A^2}\\
\quad A^2 = \left(\frac{bh}{2}\right)^2 = \frac{b^2h^2}{4}\\
\quad\quad h^2 = \begin{cases} c^2-(c\cos{A})^2 \\ a^2-(b-c\cos{A})^2 \end{cases}\\
\quad\quad c\cos{A} = \frac{c^2+b^2-a^2}{2b}\\
\quad\quad h^2 = c^2 - \left(\frac{c^2+b^2-a^2}{2b}\right)^2 = \Pi\left(c \pm \frac{c^2+b^2-a^2}{2b}\right) = \Pi\frac{2bc \pm (c^2+b^2-a^2)}{2b}\\
\quad \begin{aligned}A^2 &= \cfrac{(2bc + (c^2+b^2-a^2))(2bc - (c^2+b^2-a^2))}{16} \\&= \cfrac{((b+c)^2-a^2)(a^2 - (b-c)^2)}{16} \\&= \cfrac{(b+c+a)(b+c-a)(a-b+c)(a+b-c)}{2\cdot2\cdot2\cdot2} \\&= \cfrac{a+b+c}{2}\cdot\cfrac{a+b+c-2a}{2}\cdot\cfrac{a+b+c-2b}{2}\cdot\cfrac{a+b+c-2c}{2} \\&= s(s-a)(s-b)(s-c)\end{aligned}\\
A = \sqrt{s(s-a)(s-b)(s-c)}
\end{array}\]
\[\small\begin{array}{l}
A = \sqrt{A^2}\\
\quad A^2 = \left(\frac{bh}{2}\right)^2 = \frac{b^2h^2}{4}\\
\quad\quad h^2 = \begin{cases} c^2-(c\cos{A})^2 \\ a^2-(b-c\cos{A})^2 \end{cases}\\
\quad\quad c\cos{A} = \frac{c^2+b^2-a^2}{2b}\\
\quad\quad h^2 = c^2 - \left(\frac{c^2+b^2-a^2}{2b}\right)^2 = \Pi\left(c \pm \frac{c^2+b^2-a^2}{2b}\right) = \Pi\frac{2bc \pm (c^2+b^2-a^2)}{2b}\\
\quad \begin{aligned}A^2 &= \cfrac{(2bc + (c^2+b^2-a^2))(2bc - (c^2+b^2-a^2))}{16} \\&= \cfrac{((b+c)^2-a^2)(a^2 - (b-c)^2)}{16} \\&= \cfrac{(b+c+a)(b+c-a)(a-b+c)(a+b-c)}{2\cdot2\cdot2\cdot2} \\&= \cfrac{a+b+c}{2}\cdot\cfrac{a+b+c-2a}{2}\cdot\cfrac{a+b+c-2b}{2}\cdot\cfrac{a+b+c-2c}{2} \\&= s(s-a)(s-b)(s-c)\end{aligned}\\
A = \sqrt{s(s-a)(s-b)(s-c)}
\end{array}\]
Sunday, June 22, 2014
A rational sinusoidal function
It is easy to get confused by the irrational nature of the sin function. One might think that you need irrational numbers to create a sinusoidal graph, but that's false. Consider \(z_a = (a+i)^2/(a^2+1) \quad (a \in \mathrm{Rat})\). It lies on the unit circle in the complex plane and its coordinates are rational. Here is a rational sinusoidal function: \(f(x) = \operatorname{Im}(z_a^x) \quad (x \in \mathrm{Int})\). This is what it may look like:
However, it has some irrational properties. According to WolframAlpha, \(\lim_{x\to\infty}z_x^x = e^{2i}\). The function \(f\) is probably injective for some values of \(a\).
Monday, June 16, 2014
Ugliest sequence ever
Let \(a_0 = 0, a_2 = 1\) and \(a_n = a_{\left\lfloor{n/2}\right\rfloor} + a_{\left\lfloor{n/2}\right\rfloor+1}\).
Wednesday, June 4, 2014
Basic interpolation
Say we've got \(n\) points through which we need to fit a polynomial. We'll solve the problem iteratively. First we'll find a polynomial that passes through one point, then we'll add a term to that polynomial to make it pass through another point, and then a third point will come into play -- etc.
Let the given points be \(\begin{array}{c}n\\(x_i, y_i)\\i=1\end{array}\) and let \(p_k\) denote the \(k\)th polynomial that we find. \(p_n\) is our final answer. \(p_k = \begin{cases}y_1 & \text{ if } k = 1\\ p_{k-1} + (y_k - p_{k-1}\bigg|_{x=x_k}) \prod_{i=1}^{k-1} \frac{x - x_i}{x_k - x_i} & \text{ if } 1 < k \leq n\end{cases}\).
Let the given points be \(\begin{array}{c}n\\(x_i, y_i)\\i=1\end{array}\) and let \(p_k\) denote the \(k\)th polynomial that we find. \(p_n\) is our final answer. \(p_k = \begin{cases}y_1 & \text{ if } k = 1\\ p_{k-1} + (y_k - p_{k-1}\bigg|_{x=x_k}) \prod_{i=1}^{k-1} \frac{x - x_i}{x_k - x_i} & \text{ if } 1 < k \leq n\end{cases}\).
Sunday, May 18, 2014
A fun fact about divisibility
If and only if \(\textrm{gcd}(a, b) = 1\) there exists a positive \(x\) such that \(b | a^x - 1\). This means that all rational numbers can be expressed as \(\frac{z}{(a^x - 1)a^y}\) using any \(a \geq 2\).
Subscribe to:
Posts (Atom)