﻿ March | 2012 | Bits of Pancake

Monthly Archives for March 2012

Explanation of the Dirichlet function

My calculus teacher gave an example of a function that was discontinuous everywhere, the Dirichlet function. It indicates whether a number is rational or irrational: $$D(x) = \begin{cases}1 & \text{ if } x \in \mathbb{Q} \\ 0 & \text{ otherwise }\end{cases}$$ … Continue reading

28. March 2012 by Casey

Markov chain text generator

Back in December, I was learning about Markov chains in my linear algebra class, and I read on Wikipedia that they could be used to generate real-looking text from a bunch of source texts. Since I wanted to procrastinate on … Continue reading

26. March 2012 by Casey

Minimum and maximum of two functions

Let’s say you want a function that outputs the smaller of two functions along its domain. It turns out that the expression for that function is this: $$\operatorname{min}(f(x),\ g(x)) = \frac{f(x) + g(x) – |f(x) – g(x)|}{2}$$ For example, take … Continue reading

26. March 2012 by Casey

Quotient rule with determinants?

I’ve always found the quotient rule for differentiation hard to remember: $$\dod{}{x}\frac{f}{g} = \frac{f’g – g’f}{g^2}$$ I was looking on the Wikipedia page for the finite difference operator and noticed that they use the determinant in describing the quotient rule for … Continue reading

25. March 2012 by Casey