Confusion about absolute value, exponents, and logarithms

182 Views Asked by At

Problem 1:

$\int \tan x\, dx$

The answer in the book is $-\ln |(\cos x)|+C$. I used the following steps: $$\ln |\sec x|+C$$ $$\ln |(\cos x)^{-1}|+C$$ $$-\ln |(\cos x)|+C$$

Problem 2:

$\int \frac{\sin 2x}{1-\cos 2x}\, dx$

The answer in the book is $\ln \sqrt{|1-\cos 2x|}+C$. I used the following steps: $$u=1-\cos 2x$$ $$dx=\frac{du}{2\sin 2x}$$ $$\frac{1}{2}\int \frac{1}{u}\, du$$ $$\frac{1}{2}\ln |1-\cos 2x|+C$$ Here is where I get confused. Based on problem 1, $\frac{1}{2}\ln |1-\cos 2x|+C$ should equal $\ln |\sqrt{1-\cos 2x}|+C$ but it must equal $\ln \sqrt{|1-\cos 2x|}+C$ because that's the correct answer. So what is the rule when turning the number in front of a logarithm into an exponent when an absolute value is in the logarithm argument?

2

There are 2 best solutions below

5
On BEST ANSWER

$1-\cos \, t \geq 0$ for all real numbers $t$ so absolute values signs are unnecessary in your answer as well as the given answer. So the two answers are the same.

5
On

If $x\in\mathbb R$, then $1-\cos(2x)\geqslant0$. Therefore,$$\ln\sqrt{\big\lvert1-\cos(2x)\bigr\rvert}=\ln\left(\left\lvert\sqrt{1-\cos(2x)}\right\rvert\right)=\ln\left(\sqrt{1-\cos(2x)}\right).$$