What is the difference between $\ln(\sin\frac{x}{2}+\cos\frac{x}{2} )- \ln(\sin\frac{x}{2}-\cos\frac{x}{2})$ and $\ln(\tan x+\sec x)$

102 Views Asked by At

I've noticed if you ask wolfram what is the integral of $ \sec x$ they will answer

$$\ln\left(\sin\frac{x}{2}+\cos\frac{x}{2}\right) - \ln\left(\sin\frac{x}{2}-\cos\frac{x}{2}\right)$$

I've been taught that the $\int\sec x = \ln|\tan x + \sec x | + C$ which is in my opinion way simpler to read and write.

However, even in the alternatives form of Wolfram, I could not find it there which let me believe that what I've been taught is probably not exact (but near) and they teach us that so it is simpler for us to learn.

Am I right ? If yes, what is the difference ?

2

There are 2 best solutions below

2
On BEST ANSWER

there is no difference. here is a reason $$\begin{align}\tan x + \sec x &= \frac{\sin x}{\cos x} + \frac 1 {\cos x}\\ & = \frac{1+\sin x}{\cos x} \\ &= \frac{\sin^2x/2 + \cos^2x/2 + 2\sin x/2 \cos x/2}{\cos^2 x/2 - \sin^2 x/2} \\ &= \frac{(\sin x/2 + \cos x/2)^2}{(\cos x/2 - \sin x/2)(\cos x/2 + \sin x/2)}\\ &=\frac{\sin x/2 + \cos x/2}{\cos x/2 - \sin x/2}\end{align}$$

0
On

It should also include the absolute values. Both of the two answers are correct, and they are equivalent. They come from different methods to solve the integral.

Method 1: $$\int \sec{x} dx=\int \frac{1}{\cos{x}} dx=\int \frac{\cos{x}}{\cos^2{x}}dx\\ =\int \frac{d \sin{x}}{1-\sin^2{x}}=\int \frac{d\sin{x}}{(1+\sin{x})(1-\sin{x})}\\ =\frac{1}{2}\int \frac{d\sin{x}}{1+\sin{x}}dx+\frac{1}{2}\int \frac{d\sin{x}}{1-\sin{x}}dx\\ =\frac{1}{2}\ln|(1+\sin{x})|-\frac{1}{2}\ln|(1-\sin{x})|\\ =\ln|\sin\frac{x}{2}+\cos\frac{x}{2}| - \ln|\sin\frac{x}{2}-\cos\frac{x}{2}|+C$$

since $1+\sin{x}=\sin^2{(x/2)}+2\sin{(x/2)}\cos{(x/2)}+\cos^2{(x/2)}=(\sin{(x/2)}+\cos{(x/2)})^2$, and similarly for $1-\sin{x}$.

Method 2: $$\int \sec{x} dx=\int \frac{\sec{x}(\sec{x}+\tan{x})}{\sec{x}+\tan{x}}dx=\int \frac{d(\sec{x}+\tan{x})}{\sec{x}+\tan{x}}=\ln|\sec{x}+\tan{x}|+C$$

The first method is usually what people would first think of if the formula is not already known.