Logarithm and trigonometry

95 Views Asked by At

Is $\ln (\sin x-\cos x)$ equal to $\ln (\cos x-\sin x)$?

So I did a integral problem but the answer is not same the answer given.

I'm given this question $\int (\frac{2}{1-\tan x})dx$

So I got the answer which is $x-\ln (\tan x-1)+\frac{1}{2}\ln (\sec ^2x)+c$ Then I simplify it into $x-\ln (\sin x -\cos x)+c$

But the given answer is $x-\ln (\cos x-\sin x) + c$

4

There are 4 best solutions below

0
On

No, but $\ln|\sin x-\cos x|=\ln|\cos x-\sin x|$. Both functions you're interested in have the same derivative, but are defined on different intervals. Using the absolute value encompasses both.

0
On

No, they are not the same. The logarithm function is defined only on the positive real numbers, meaning that $\ln(\sin(x) - \cos(x))$ is defined where $\sin(x) - \cos(x) > 0$ and $\ln(\cos(x) - \sin(x))$ is defined only where $\cos(x) - \sin(x) > 0$, meaning that the domains of the two functions have no points in common.

0
On

The antiderivative of $\dfrac1x$ is $\ln|x|$, defined both for negative and positive values of the argument. So the sign is irrelevant.

As you can check,

$$x>0\implies (\ln|x|)'=(\ln x)'=\frac1x\\ x<0\implies (\ln|x|)'=(\ln(-x))'=\frac{-1}{-x}=\frac1x. $$

0
On

If
$$\ln (\sin x-\cos x) = \ln (\cos x-\sin x) = u, $$ then

$$ (\sin x-\cos x) = (\cos x-\sin x) = e^u $$ or

$$ \tan x = 1. $$

So it is valid for real $ x = \pm \, \pi/4 $ and its co-terminal angles only.

EDIT 1:

For complex variable $ z$ for a sign change, the others pointed it out already as valid for log of any function:

$$ \dfrac{ \ln (\sin z-\cos z)}{ \ln (\cos z-\sin z)} = \pi i $$

$$ \dfrac{ \ln f(z) }{ \ln f(- z)} = \pi i. $$