Unit Test 2: LaTeX Plugin

Summary Unit test to verify that the LaTeX plugin is properly generating text.

This test determines if the LaTeX plugin is working correctly.

Here's an example of some LaTeX: \LaTeX .

Here's Schrodinger's equation: \[i\hbar {\partial\Psi(\mathbf{r} ,\,t) \over \partial t} = \hat H \Psi (\mathbf{r},\,t) \].

Here's a short problem I wrote.

For what values of $k$ does $S$ have real solutions? \[ S = \frac{k}{k - \frac{k}{k - \frac{k}{k - \cdots}}} \]

And here's the solution.

\begin{align*} S &= \frac{k}{k - \frac{k}{k - \frac{k}{k - \cdots}}} \\
\frac{k}{S} &= k - \frac{k}{k - \frac{k}{k - \cdots}} \\
\frac{k}{S} &= k - 7S \\
k &= kS - S^2 \\
S^2 - kS + k &= 0 \\
S &= \frac{k \pm \sqrt{k^2 - 4k}}{2} \end{align*}

which leads us to

\[ S \in \mathbb{R} \Rightarrow \sqrt{k^2 - 4k} \in \mathbb{R} \Rightarrow k^2 - 4k \geq 0 \]

That gives us the answer: \[ \therefore \ S \in \mathbb{R} \Rightarrow \{ k : k \in \mathbb{R} \wedge \left( k \leq 0 \vee k \geq 4 \right) \} \]

(Sometimes we need to add ignore blocks so that Textile will be suppressed.)

Computer science can join the party too. Finding an element in an array A is an \[ \mathcal{O} \left( n \right) \] operation, while finding it in a binary tree T is an \[ \mathcal{O} \left( \log n \right) \] operation.

Trackbacks (none)

TrackBack URL: http://distilledb.com/mt/mt-tb.cgi/3

leave new comment