Niven's proof that Pi is irrational
Following Niven (Pi source book, page 276), define

f[n_,x_]:= b^n x^n (Pi - x)^n/n!
f[n,x]

If Pi = a/b, this is the same as Niven's

x^n (a - b x)^n/n!

Now sum up all the even derivatives of this function, with alternating signs:

F[n_,x_] := Sum[(-1)^i D[f[n,x],{x,2i}],{i,0,n}]

F[n,x]

The resulting polynomials have lots of terms, and some of the coefficients are not integers.

F[4,x]

However, at x = 0, all the coefficients of the terms that survive are integers, because in killing off the x^n we
end up multiplying by n!

F[4,x]/.x->0

For similar reasons, all the coefficients are integers when we evaluate at x = Pi.

F[4,x]/.x->Pi

In spite of the rather large coefficients, the actual numerical value of f is small.

F[4,x]/.x->0//N

When we increase the value of n, the coefficients get larger and larger, but the numerical value gets samller and smaller.

F[10,x]/.x->0

F[10,x]/.x->0//N

F[14,x]/.x->0

N[F[14,x]/.{x->0},40]

F[20,x]/.x->0

N[F[20,x]/.{x->0},60]

F[30,x]/.x->0

N[F[30,x]/.{x->0},100]

By virtue of the way that it was constructed, this function F satisfies the differential equation 
F''(x) + F(x) = f(x).  For example, if n = 6,

D[F[6,x],{x,2}] + F[6,x]- f[6,x]

Thus, for any value of n, the function F(x) satisfies the differential equation

(∂_x) (  F'[x] Sin[x]  -  
            F[x] Cos[x])  ==  f[x] Sin[x]

Again a check for n = 6

D[ D[F[6,x],x] Sin[x] - F[6,x] Cos[x],x] - f[6,x] Sin[x]//Simplify

As a result, when we integrate f(x) sin(x) from 0 to Pi, the result is just F(0) + F(Pi) or 2 F(0)

Integrate[ f[6,x] Sin[x], {x,0,Pi}]//Simplify

2 * F[6,x]/.x->0//Simplify

Now suppose someone claims that Pi = a/b.  On the one hand we can make this substitution in 2 * F(0). If n = 6

2 * F[6,x]/.{x->0,Pi->a/b}//Simplify

For any value of n, the result is clearly an integer, and it cannot be zero because it is the value of the integral of a positive quantity from zero to pi.

But remember what f is:

f[n,x]/.Pi->a/b

So the integrand f(x) sin(x) is always less than

Pi^n a^n/n!

and its integral from 0 to pi is less than pi times this.

Now we can choose n to be larger than a * Pi.  As we increase n still further, the denominator grows faster than the numerator, and so we can make the value of the integral as small as we like.  To be specific, we can make it less than 1.  But we proved that the value of the integral must be a positive integer.  Since there is no positive integer less than 1, we have arrived at a contradiction.  Thus the claim that pi = a/b must have been wrong.