Ruben’s blog

Division by constant unsigned integers

Most modern processors have an integer divide instruction which is relatively slow compared to the other arithmetic operations. When the divisor is known at compile-time or the same divisor is used for many divisions, it is possible to transform the single division to a series of instructions which execute faster. Most compilers will optimize divisions in this way. In this article, I give an overview of the existing techniques.

The finite element method

The finite element method is an elegant mathematical method to numerically solve partial differential equations. In this article, I give a short introduction.

The singular value decomposition

The singular value decomposition is a matrix decomposition with many applications, one of them being principal component analysis. In this article I use the spectral theorem for Hermitian matrices to easily prove the existence of the singular value decomposition.

The spectral theorem for Hermitian matrices

This article proves some pleasing properties of Hermitian matrices, and uses them to prove that Hermitian matrices can be diagonalized in a specific form.

Smooth iteration count for the Mandelbrot set

The Mandelbrot set is a famous fractal. The naive way to color it uses an integer (the number of iterations). However, there is a way to obtain a smoothed version of the iteration count. In this article, I show how it can be derived.

The rational root theorem and a Putnam question

I give a proof of the rational root theorem, and solve a related question from the Putnam mathematical competition.

A simpler form of the quadratic formula

Most of us had to learn the quadratic formula in high school. In this article I argue that a technique called `completing the square´ is more useful and should be used instead.

Euler's formula for connected planar graphs

Euler's formula for connected planar graphs shows a pleasing relation between the number of vertices, edges, and faces in a planar graph. In this article I show how to derive the formula.

The Euler-Lagrange equation

The Euler-Lagrange equation is an import equation which is useful when you try to find a extrema of functionals, which are mappings from functions to the real numbers. In this article I show a derivation and some applications.