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?

No comments:

Post a Comment