# Antiderivative of tan x

I was toying with Problem 317 on Project Euler when I found a messy (but rather easy) antiderivative of a polynomial (with messy coefficients of course). Somehow whatever train of thoughts led me to think of the antiderivative of tan x. (That’s extremely sidetracked, but whatever. My initial guess of 2.4 million something was wrong anyway 😛 )

And it is pretty surprising.

Letting $u = \cos x$, we have $du = -\sin x \,dx$. Hence
$\displaystyle \int \tan x \,dx = \int - \dfrac{-\sin x \,dx}{\cos x} = \int -\dfrac{du}{u} = - \ln |u| + C = - \ln |\cos x| + C$.

Wild Logarithm appeared! But seriously. This is pretty amusing. Well, if you know $\dfrac{d}{dx} \arctan x = \dfrac{1}{1 + x^2}$, this is not that amusing, but still.

Math has always mesmerized me with its beautiful, unexpected results. However, it requires deep thought to actually understand it, hence a boatload of dislikes to math. In my class of 22 students, only one goes deep to math (namely me); one or two are good at school math, a few more okay, but that’s it; the rest are…uh…terrible. Of course, you cannot ask the opinion of a person who really digs math about math in these settings (aka the question about how his classmates are progressing in math); that’s biased.

Recently, namely 2.5 hours ago, I’ve just finished tutoring seven of my classmates for about 5.5 hours about math. Tomorrow is math (and history) finals exam, and it involves four topics: antiderivatives and integrals, matrices, vectors, and geometric transformation. I almost gave a very terrible problem (find the area enclosed between $y = e^x - 1$ and $y = \ln (x+1)$, later revised to be base 2 instead of e); it’s terrible just because finding the intersection points will be a nightmare for them. Although I’m positive that most readers of this post can solve the problem without too much effort (note that the former is convex and the latter is concave, so they cut at at most two points, and they can be found easily).

Appreciating math (or any subject for that matter) is hard. I tend not to appreciate Indonesian (mostly because of severely flawed and broken “opinion-type” questions, where English should have anyway but our English focus more on grammar and reading); there might be someone out there who loves Indonesian more than their spouse (if there is any). Sometimes someone simply doesn’t appreciate any subject at all. I don’t have any right to judge; it might be that they like something else.

However, if you have the patience and logic to grasp the hidden beauty of math masked by mindless exercises such as $\int x \sin x + x \sin x^2 \,dx$, you might just stare in awe (or in confusion; again note that you need logic) of the beauty of math. You might even be amazed of the wonders of antiderivatives; note that the above example employs both partial integration (for first term) and integration by substitution (for second term) while differing only a number in its expression. So beautiful, so orderly.

Now that I’ve written too much, I might better sleep and prepare for tomorrow. It’s going to be a big day. (Those seven will come again for tutor on Tuesday’s Physics. 😛 )