Mistake in evaluating the secant integral?

80 Views Asked by At

I was trying to solve the secant integral

$$\int \dfrac{1}{\cos x} dx $$

by using the substitution $t := \tan(\dfrac{x}{2})$. Using this, I found:

$$dx =\dfrac{2\cdot dt}{t^2 + 1} $$

and

$$\cos(x) = \dfrac{1 -t^2}{1+t^2} $$

This would mean that:

$$\begin{split} \int \dfrac{1}{\cos x} dx &= \int \dfrac{1+t^2}{1 -t^2} \cdot \dfrac{2\cdot dt}{t^2 + 1}\\&= 2 \int \dfrac{1}{1-t^2} dt \\&= 2 \int \left(\dfrac{1}{2(t-1)} - \dfrac{1}{2(t+1)}\right)dt\\&= \int \left(\dfrac{1}{t-1} - \dfrac{1}{t+1}\right)dt\\&=\log(t-1) - \log(t+1)\\&=\log\left(\dfrac{t-1}{t+1}\right)\\&=\log\left(\dfrac{\tan{\dfrac{x}{2}}-1}{\tan{\dfrac{x}{2}}+1}\right) \end{split}$$

By using a plotting tool it is clear that this last expression is not equal to the answer.

I know that there are many ways to derive this integral and I understand them all, but what I don't understand is why my method above fails.

That's why I am asking specifically which step above is wrong.

1

There are 1 best solutions below

0
On BEST ANSWER

It's because when you wrote$$\frac1{1-t^2}=\frac1{2(t-1)}-\frac1{2(t+1)},$$you exchanged the sign. You should have written$$\frac1{1-t^2}=\frac1{2(t+1)}-\frac1{2(t-1)}$$instead.