Antiderivative of secant

(Yes, I’m bored. So why not completing my series.)

Antiderivative of tangent

First, remember that \dfrac{d}{dx} \ln |x| = \dfrac{1}{x}, so by chain rule we obtain \dfrac{d}{dx} \ln |f(x)| = f'(x) \cdot \dfrac{1}{f(x)} = \dfrac{f'(x)}{f(x)}. By the (first) fundamental theorem of calculus, derivative and antiderivative are two inverse operations, thus we obtain \displaystyle\int \dfrac{f'(x)}{f(x)} \, dx = \ln |f(x)| + C.

Also, recall that \dfrac{d}{dx} \tan x = \sec^2 x and \dfrac{d}{dx} \sec x = \sec x \tan x. Don’t tell me you don’t know this; if you don’t, then stop reading.

To the real meat.

\displaystyle\int \sec x \, dx

= \displaystyle\int \dfrac{\sec x (\tan x + \sec x)}{\tan x + \sec x} \, dx (!)

= \displaystyle\int \dfrac{\sec^2 x + \sec x \tan x}{\tan x + \sec x} \, dx

Letting f(x) = \tan x + \sec x, we have f'(x) = \sec^2 x + \sec x \tan x (!). Thus,

= \displaystyle\int \dfrac{f'(x)}{f(x)} \, dx

Which by our lemma above is equal to

= \ln |f(x)| + C

= \ln |\tan x + \sec x| + C (Hint: Wikipedia is your friend.)

Usually I stop here, but you can also simplify it to involve only one trigonometric function:

\tan x + \sec x

= - \cot \left( x + \frac{\pi}{2} \right) + \dfrac{1}{\cos x}

= - \dfrac{1}{\tan \left( x + \frac{\pi}{2} \right)} + \dfrac{1}{\sin \left( x + \frac{\pi}{2} \right)} (!)

Call a = \dfrac{x}{2} + \dfrac{\pi}{4}. So

= - \dfrac{1}{\tan 2a} + \dfrac{1}{\sin 2a}

= - \dfrac{1}{ \dfrac{2 \tan a}{1 - \tan^2 a} } + \dfrac{1}{2 \sin a \cos a}

= - \dfrac{1 - \tan^2 a}{2 \tan a} + \dfrac{\sec a}{2 \sin a}

= \dfrac{\tan^2 a - 1}{2 \tan a} + \dfrac{\sec a}{2 \sin a \cdot \frac{\cos a}{\cos a}}

= \dfrac{\tan^2 a - 1}{2 \tan a} + \dfrac{\sec a}{2 \cos a \cdot \frac{\sin a}{\cos a}}

= \dfrac{\tan^2 a - 1}{2 \tan a} + \dfrac{\sec^2 a}{2 \tan a}

= \dfrac{\tan^2 a - 1 + \sec^2 a}{2 \tan a}

= \dfrac{\tan^2 a + \tan^2 a}{2 \tan a} (remember \tan^2 x + 1 = \sec^2 x?)

= \dfrac{2 \tan^2 a}{2 \tan a}

= \tan a

= \tan \left( \dfrac{x}{2} + \dfrac{\pi}{4} \right)

Thus \displaystyle\int \sec x \, dx = \ln \left| \tan \left( \dfrac{x}{2} + \dfrac{\pi}{4} \right) \right| + C.

Now, what happens to \displaystyle\int \sec^3 x \, dx

Puzzles!

Yeah, I will continue making puzzles, only not at the same rate as the one in my blog. Probably once every time I have the time. Maybe like betaveros and his one-month-a-puzzle schedule (though he starts deviating to less than a week per puzzle (who said I won’t either? (yay parentheses nesting))). If I can make the picture from this phone. >_<

Meanwhile, inspired from this blog entry, here’s a little puzzle for you to crack…

S01 – Slitherlink

This is a Slitherlink puzzle, with the All-Odd variation. All the odd numbers have been given to you; an empty cell indicates that its clue is not odd. Your task is not (only) to find the solution; your task is to prove that the solution is unique.

EDIT: Okay prove that there is no solution. Apparently you must make a loop.

Yeah it’s cruel. And whoa a post within a post.