Is it possible to manipulate Niven's proof of the irrationality of $\pi$ to prove the irrationality of $\sqrt{2}$? Section 2 of Keith Conrad's note "Irrationality of $\pi$ and $e$" (PDF link via uconn.edu) recounts Ivan Niven's proof of irrationality of $\pi$. (See also Niven's original note "A simple proof that $\pi$ is irrational" (PDF link via ProjectEuclid.org).) 

Is it possible to manipulate this proof to prove the irrationality of, say, $\sqrt{2}$?

 A: For to make the things more clear I rewrite Niven's proof a bit more simplified.
Let $\pi=\frac{a}{b}$, with $a,b\in\textbf{N}$. I define the function
$$
f(x)=\frac{x^n(a-bx)^n}{n!},
$$ 
where $n$ is to be determined later. Proceeding it holds
$$
f\left(\frac{a}{b}-x\right)=f(x)\textrm{, hence }f(\pi-x)=f(x)
$$
I define
$$
F(x)=f(x)-f''(x)+f^{(4)}(x)-\ldots+(-1)^n f^{(2n)}(x).
$$
Then $n!f(x)$ is of the form
$$
A_1x^{2n}+A_2x^{2n-1}+\ldots+A_{n+1}x^n\textrm{, }A_k\in\textbf{Z}
$$
Hence $f(x),f'(x),f^{(2)}(x),\ldots,f^{(2n)}(x)$, for $x=0$ are all integers. Hence $f(\pi)$ are also integers via. $f(x-\pi)=f(x)\Rightarrow f(\pi)=f(0)$. But
$$
\frac{d}{dx}(F'(x)\sin x-F(x)\cos x)=F''(x)\sin x+F(x)\sin x=f(x)\sin x.
$$
Hence
$$
\int^{\pi}_{0}f(x)\sin x dx=\left[F'(x)\sin x-F(x)\cos x\right]^{\pi}_{0}=F(\pi)+F(0)=\textrm{integer}
$$
But for $0<x<\frac{a}{b}=\pi$, we have 
$$
0<f(x)\sin x\leq \frac{x^n(a-b x)^n}{n!}\leq \frac{\pi^na^n}{n!}
$$
Hence
$$
\int^{\pi}_{0}f(x)\sin xdx\leq \frac{\pi^na^n}{n!}\pi
$$
and when $n$ very large we have (clearly)
$$
0<\textrm{integer}<1
$$
Contradiction. Hence $\pi$ is not rational. QED 
If we assume that $\xi$ is any non rational number and we want to use Niven's proof for it, then we assume the integral
$$
A_n(x)=\int_{(n)}A_0(x)(dx)^{(n)}=\underbrace{\int\int\ldots\int}_{n-times}A_0(x)\underbrace{dxdx\ldots dx}_{n-times},
$$
with some normalization conditions in the limit points of integration i.e. $\int=\int^{x}_{c}$ for some constant $c$ or even sequence $c_1,c_2,\dots,c_n$. Then seting as Niven $\xi=\frac{a}{b}$, $a,b$ posotive integers such $gcd(a,b)=1$ and $a<b$ (for simplicity):
$$
f(x)=\frac{x^n(a-bx)^n}{n!}
$$ 
and
$$
\int^{\xi}_{0}f(t)A_0(t)dt=\int^{\xi}_{0}f(t)A_1'(t)dt=f(\xi)A_1(\xi)-f(0)A_1(0)-\int^{\xi}_{0}f'(t)A_1(t)dt
$$
also
$$
\int^{\xi}_{0}f'(t)A_1(t)dt=\int^{\xi}_{0}f'(t)A_2'(t)dt=f'(\xi)A_2(\xi)-f'(0)A_2(0)-\int^{\xi}_{0}f''(t)A_2(t)dt
$$
$$
\ldots
$$
$$
\int^{\xi}_{0}f^{(k-1)}(t)A_{k-1}(t)dt=\int^{\xi}_{0}f^{(k-1)}(t)A'_{k}(t)dt=f^{(k-1)}(\xi)A_{k}(\xi)-f^{(k-1)}(0)A_k(0)-
$$
$$
-\int^{\xi}_{0}f^{(k)}(t)A_k(t)dt.
$$
Hence
$$
\int^{\xi}_{0}f(t)A_0(t)dt=\sum^{2n}_{k=n}f^{(k)}(0)\left(A_{k+1}(\xi)-A_{k+1}(0)\right)\tag 1
$$
Hence if we assume that 
I.
$A_0(x)$ is continuous and $0<A_0(x)<C\textrm{, }x\in[0,\xi]$, for some constant $C$.
II.
$$
\sum^{2n}_{k=n}f^{(k)}(0)\left[A_
{k+1}(\xi)-A_{k+1}(0)\right]\in\textbf{Z}\textrm{, }n=0,1,2,\ldots
$$ 
Then holds (1) and 
$$
0<f(x)A_0(x)<\frac{x^n(a-b x)^n}{n!}C\leq \frac{\xi^na^n}{n!}
$$
hence
$$
0<\int^{\xi}_{0}f(t)A_0(t)dt\leq \frac{\pi^n a^n\xi C}{n!}
$$
Hence again for $n$ large we have
$$
0<\textrm{integer}<1,
$$
which is contradiction. Hence $\xi$ will then be irrational.
NOTE that
1.
$$
f(x)=\frac{x^n(a-bx)^n}{n!},
$$ 
is the same function as in Niven's proof.


*If we replace $A_0(x)=\sin x$ and $\xi=\pi$, we get Niven's proof. 

*An application of the above method possibly can be found, if we assume $A_0(x)=\sin(\log(x))$, $\xi=e^{\pi}$.
