An integral expression for n!

I gave a challenge question at the end of class a week or so ago. Here I will give the solution and show that it gives us something rather strange and surprisingly useful.

I wrote down the following, and asked you to prove it:

 

\int_0^\infty e^{-t} t^N dt=N!

 

For N\ge 0, N\in \mathbb{Z}. Now, N! can be thought of as the number of different orderings of pulling N objects out of a bag (without replacement) when they are all different. If you have N things in a bag, then there are N possible things that you can pull out first. There are then N-1 ways of pulling out the next object, N-2 ways of pulling out the next, etc. and finally, when you’ve pulled out N-1 objects there’s only a single possibility of pulling out the last. So:

 

N!=N(N-1)(N-2)(N-3)...3.2.1

 

And the number of ways of pulling no objects out of a bag is 1, because you just don’t pull anything out.…

A general formula for partial fractions

Out of the blue I wrote down a rather confusing mass of indices and summations on the board a few days ago. Writing this down at the last minute was perhaps a bad idea, but I wanted to show what the general form for expanding a fraction into partial fractions was. Here I’m just motivating it a little more. It’s not something that you will need to use, but it’s often good to write things down in as general a form as you can.

Let’s say that we have an expression of the form:

 

\frac{P(x)}{(x+3)(x-2)^2}

 

Where P(x) is some polynomial of degree less than 3 (because the denominator is degree 3). We can write this as:

 

\frac{A}{x+3}+\frac{B}{(x-2)^2}+\frac{C}{x-2}

 

To find A,  B and C, you cross-multiply, and then match coefficients of powers of x with those in P(x).  If you have an irreducible quadratic in the denominator you will have terms of the form:

 

\frac{Ax+B}{ax^2+bx+c}

 

in your partial fraction, and of course if it’s an irreducible quadratic to an integer power greater than one, you will have multiple terms, just as you do for the (x-2) expression in the example above.…

By | July 30th, 2016|Courses, First year, MAM1000, Uncategorized, Undergraduate|1 Comment

The 17 equations that changed the world

I was so excited the first time I read Ian Stewart’s book entitled “The 17 equations that changed the world“. The book is written in simple and easy to understand language with interesting practical examples for applications. I immediately wrote to Ian Stewart requesting if I could reproduce his work in form of posters in both English and French to be used at AIMS-IMAGINARY in Senegal in 2015 (see here). I remember his only reply was “please proceed but I won’t be able to attend since I have prior committments”. Business Insider published a list of these equations emphasing further how intuitive they are (see here). I do strongly believe every school in the world be it elementary, college, secondary, technical, university, you name it, should have these posted up or painted on the walls of their science departments/offices, classrooms, laboratories etc; in all langauges applicable.…

By | July 29th, 2016|Uncategorized|3 Comments

Square roots: in your head

I came across the following YouTube video a while back which uses a strange trick to accurately approximate square roots. I suggest watching at least the first minute where the presenter explains how it’s done:

Let’s do an example. Approximate to 2 decimal places: \sqrt{40}

First, YouTube tells us to find the nearest perfect square that’s less than 40, that’s 36, and take the root, giving us 6. So our answer is, obviously, 6 point something. That something is a fraction, where the numerator is the difference between 40 and 36, and the denominator is 2 times 6. So we have:

 \sqrt{40} \approx \sqrt{36} +\frac{4}{12} = 6+ \frac{1}{3} \approx 6.33

So what’s the actual answer to 2 decimals? It’s 6.32. That’s what I like to call: pretty darn close. Naturally, there are a few catches to this technique: you need to know your perfect squares, you need to know your fractions, and things tend to get hard with larger numbers.

But still, I thought this was surprisingly effective for such a simple piece of arcane trickery.…

By | June 23rd, 2016|Uncategorized|1 Comment

Type Theory, Logic, and Programming

Hello Internet. In this blog post we are going to learn some type theory, which is a field that lies in the intersection of mathematics and computer science. We are eventually going to learn the variant called Martin-Loef Type Theory, or MLTT for short. To motivate it, we are going to try answering the question, “What is a valid program?”

Not every program makes sense, for example what would a program consisting of the single expression x + 2 mean? If we don’t know what x is, then we don’t know what the meaning of that expression is. More importantly, a program can combine expressions that are incompatible with each other. For example, if + is the usual operation that adds two numbers then an expression like "abc" + 5 can’t be given a meaning. To avoid such meaningless programs, we should talk about the different kinds of data and the valid operations on these pieces of data.…

By | June 19th, 2016|Uncategorized|2 Comments

Down the rabbit hole

The following has been a rather interesting journey – from a test question which seemed fine, to a subtlety which seemed easy, to a discussion with a number of different mathematicians about the nature of distributions, measure theory and regularisation. I will try and make it as clear as possible in the post below. Note, as mentioned in the comments, we have actually only found the solution to this problem for a constrained range of x, and not x \in \mathbb{R}. I didn’t want to complicate things any more than necessary here for first year students, but the comments are very important too.

 

In a recent class test, there was a question, written by me, which was not quite the question that I wanted to ask. It turns out that it does have an answer, but it’s not an answer that can yet be found by the means at the class’s disposal.…

On Convergent Sequences and Prime Numbers

Ever since Euclid first proved that there are infinitely many prime numbers, mathematicians have found ever more creative ways to prove the same result, and also various stronger theorems that imply it. Dirichlet’s Theorem, for example, states that ifm and n are relatively prime integers, then there are infinitely many prime numbers of the form mk + n for some integer k. It is also known that the sum of the reciprocals of the prime numbers diverges, that the sum

\displaystyle \sum_{\substack{p \leq n \\ p \text{ prime}}} \frac{1}{p} \sim \log(\log(n))

and that the number of prime numbers less than n is asymptotically equal to \displaystyle \frac{n}{\log(n)}. In this blog post, we will continue this proud tradition by proving that there are infinitely many prime numbers which have your phone number somewhere in their digits, and which simultaneously have a prime number of digits.

To do so, we will look at the convergence of two different sums: that of the reciprocals of the primes with a prime number of digits, and that of the reciprocals of the natural numbers which do not contain your phone number amongst their digits.…

By | May 22nd, 2016|Level: intermediate, Uncategorized|2 Comments

Nowhere Differentiable Functions

By: Jan Wuzyk

In this article I am going to show that nowhere differentiable functions do in fact exists and give a few examples, some of which are relatively modern. But first I’m going to try to answer a question that is, in my opinion, too rarely discussed in mathematics classes, ”Why do we care?”.

Why we care

To answer this question we have to look into the history of mathematics. In 1821 Augustin-Louis Cauchy published his seminal book, Cours d’Analyse, this is generally recognized as the first serious attempt to put calculus on a rigours footing[Com][1] , mainly through introducing rigorous definitions of limits,continuity and differentiability among others, and the definitions that go with them2. This was also time the integral was defined as an area instead of simply as the antiderivative.

It should be noted that Cauchy by no means closed the issue of rigour in analysis but he provided a starting point.…

By | May 17th, 2016|Uncategorized|0 Comments

The Newton-Raphson Method

How would you go about finding the value of \sqrt{3} if you didn’t have a square root button on your calculator? Well, the most obvious thing might be to try some values, based on your knowledge of the square root function. You are being asked to find that x for which:

 

x=\sqrt{3}

 

or, in other words, that x, which, when squared  gives 3. We have to be a little careful here because we know that there will actually be two numbers which satisfy this (one positive, one negative), and we are interested in the positive one only.

 

So, we try some values, but we don’t do it randomly, we can see that because 1^2=1 and 2^2=4 that whatever number squared gives 3 must be between 1 and 2. We can try something called a binary intersection. This just means taking the values which we know bound the right answer (ie. we know that 1<x<2), and trying the number in the middle.…

Welcome to Reproducing Kernel Hilbert Space

In a series of posts I hope to introduce Mathemafrica readers to some useful data analysis methods which rely on operations in a little back-water of Hilbert space, namely Reproducing Kernel Hilbert Space (or RKHS).

We’ll start with the “classic” example. Consider the data plotted in figure 1. Each data point has 3 “properties”: an x_1 coordinate, an x_2 coordinate and a colour (red or blue). Suppose we want to be able to separate all data points into two groups: red points and blue points. Furthermore, we want to be able to do this linearly, i.e. we want to be able to draw a line (or plane or hyperplane) such that all points on one side are blue, all points on the other are red. This is called linear classification.

Figure 1: A scatter of data with three properties: an x_1 coordinate, an x_2 coordinate and a colour.

Figure 1: A scatter of data with three properties: an x_1 coordinate, an x_2 coordinate and a colour.

Suppose for each data point we generate a representation of the data point \phi(x)=[x_1, x_2, x_1x_2] .…

By | April 30th, 2016|English, Level: intermediate, Uncategorized|1 Comment