Sunday, 17 January 2016

Reflecting on my math journey

Some days ago, a math professor asked us how we should define a differential operator -- are closed under addition and scalar multiplication together with product rule enough? To be honest, I still don't know the answer to this question. It dawned on me that 'How do we define integration? How do we define differentiation? What are the tools? What are the motivations for this?' are questions that I seldom ask. I realised I was not studying properly all these years. I was just being spoonfed everything. I accepted everything without a moment of thought. I memorised the definitions without thinking about why they are defined that way. I'm literally 'learning' everything but not studying any. On a positive note, it is not too late now for me to realise this! From now on, I will re-learn every single concept and really try to THINK! I hope I can develop more intuition about math.

Wednesday, 13 January 2016

Integrate using matrix representations

Has it ever occurred to you that we can integrate using matrix representations? If not, prepare to have your mind blown.

It works as follows: invert the matrix representation of the differentiation operator with respect to a clever choice of a basis and then apply the inverse of the operator to the function we wish to integrate.

Here's an example. Say we want to evaluate $$\int e^{ax}\cos bx\;dx.$$ Consider the basis $B=\{e^{ax}\cos bx,e^{ax}\sin bx\}.$ Now differentiate each basis element with respect to $x$: $$\dfrac{d}{dx}e^{ax}\cos bx=ae^{ax}\cos bx-be^{ax}\sin{bx}\\ \dfrac{d}{dx}e^{ax}\sin bx=ae^{ax}\sin bx+be^{ax}\cos{bx}.$$ The matrix representation of the differential operator is thus $$T=\begin{pmatrix}a & b\\ -b & a\end{pmatrix}.$$ To evaluate the given integral, we can calculate $$T^{-1}\begin{pmatrix}1\\0\end{pmatrix}=\dfrac{1}{a^2+b^2}\begin{pmatrix}a\\b \end{pmatrix}_B$$ As a result, $$\int e^{ax}\cos bx\;dx=\dfrac{a}{a^2+b^2}e^{ax}\cos bx+\dfrac{b}{a^2+b^2}e^{ax}\sin bx.$$ Note that there are elementary ways of evaluating this integral, but isn't this method amazing?

Tuesday, 5 January 2016

An integral with $\cos x$

Evaluate $$\int_{-\pi}^\pi \frac{3\; dx}{5-4\cos x}.$$


Method I: Real analysis
We use the half angle substitution $u=\tan \dfrac{x}{2}$. Then $du=\dfrac{1}{2}\sec^2 \dfrac{x}{2}\;dx\Rightarrow du=\dfrac{1}{2}(1+u^2)\;dx$. We evaluate the indefinite integral for illustration: $$\begin{align}\int \dfrac{3 \dfrac{2}{1+u^2}}{5-4\dfrac{1-u^2}{1+u^2}}\;du&=\int \dfrac{6\; du}{5(1+u^2)-4(1-u^2)}\\&=6\int \dfrac{du}{1+9u^2}\\&=2\int \;dt\\&=2\tan^{-1}(3u)+C\\&=2\tan^{-1}(3\tan \dfrac{x}{2})+C\end{align}$$
Let $F(x)=2\tan^{-1}(3\tan \dfrac{x}{2})$. This function is undefined for all real $x=(2k+1)\pi, k\in \Bbb Z$ because $\tan \dfrac{x}{2}$ is undefined at those points. We know the graph of $F(x)$ looks like that of a tangent function except that $F(x)$ is bounded. Since the range of $\tan^{-1} x$ is $(\dfrac{-\pi}{2},\dfrac{\pi}{2})$, that of $F(x)$ is $(-\pi,\pi)$. One cycle of $F(x)$ occurs between $(-\pi,\pi)$ just like the case in $\tan \dfrac{x}{2}$. Note also that
$$\lim_{x\to (2k+1)\pi^-} F(x)=2\cdot \dfrac{\pi}{2}=\pi\\ \lim_{x\to (2k+1)\pi^+} F(x)=2\cdot \dfrac{-\pi}{2}=-\pi.$$ Finally, to evaluate the given definite integral, we can use the continuous antiderivative $$\begin{align}\bar{F}(x)=\begin{cases}-\pi,&\quad x=-\pi^+\\2\tan^{-1}(3\tan \dfrac{x}{2}),&\quad -\pi<x<\pi\\ \pi,&\quad x=\pi^-\end{cases}\end{align}.$$ As a result, $$\int_{-\pi}^\pi \frac{3\; dx}{5-4\cos x}=\bar{F}(\pi^-)-\bar{F}(-\pi^+)=\pi-(-\pi)=2\pi.$$
Method II: Residue Theorem
Since the integrand is symmetric in $[0,2\pi]$ about $\theta=\pi$, the integral is the same as $$\int_0^{2\pi} \frac{3\; dx}{5-4\cos x}.$$Transforming this integral into a contour integral, we have $$\int_C \frac{3}{5-4\frac{1}{2}(z+z^{-1})}\dfrac{dz}{iz},$$ where $C$ is the unit circle. After some simplifications, we have $$\dfrac{-3}{i}\int_C \dfrac{dz}{(2z-1)(z-2)}=\dfrac{-3}{i} 2\pi i\bigg(\dfrac{1}{4z-5}\bigg|_{z=\frac{1}{2}}\bigg)=2\pi.$$ The singularity at $z=2$ is ignored because it is outside the unit circle.

Reference:
Improper Riemann Integrals Book by Ioannis Markos Roussos