# Help with this integral

1. Nov 26, 2004

### eljose

I have some problems in calculating the integral dx/cos(x) i have made the change exp(ix)=t and get the solution (2/i)artan(exp(ix)) but what is the real number solution?.thanks

2. Nov 26, 2004

### arildno

It's better to use the half-angle formulas:
$$\cos^{2}(\frac{x}{2})-\sin^{2}(\frac{x}{2})=\cos(x)$$
$$\cos^{2}(\frac{x}{2})+\sin^{2}(\frac{x}{2})=1$$
Your integral is then easy to evaluate with respect to the variable:
$$u=tan(\frac{x}{2})$$

3. Nov 26, 2004

### SomeRandomGuy

Maybe I am missing something, but isn't dx/cos(x) = sec(x)dx. Doing that integral is very easy, you should be able to handle it.

4. Nov 27, 2004

### sinkdeep

1/cos(x)dx
=cos(x)/(1-sin^2(x))dx
=1/(1-sin^2(x))d(sin(x))

5. Nov 28, 2004

### PBRMEASAP

To SomeRandomGuy,

Do you tutor? I have a kid who could use some help with his math homework. No doubt he could benefit from your penetrating insight and clarity of exposition.

6. Nov 28, 2004

### devious_

:rofl:

Here's yet another method to do this integral:

$$\int \sec x \; dx = \int \sec x \; \frac{\sec x+\tan x}{\sec x+\tan x} \; dx$$

$$\int \frac{\sec^{2}x + \sec x\tan x}{\sec x+\tan x}\;dx$$

Take $u=\sec x+\tan x$, then $\frac{du}{dx}=\sec x\tan x+\sec^{2}x$.

$$\int \frac{\sec^{2}x + \sec x\tan x}{\sec x+\tan x} \; dx = \int \frac{1}{u} \; du = \ln(u) \; + \; C = \ln(\sec x+\tan x) \; + \; C$$

7. Nov 28, 2004

### SomeRandomGuy

I am one to appreciate sarcasm as I am a very sarcastic individual myself. I am a tutor, actually, and I will rarely complete an integral or a problem for someone I tutor. Instead, I try to have them figure it out for themselves. That way, it is more likely they will remember the process and what to look for.

8. Nov 29, 2004

### dextercioby

Why complicate ?
$$\int \frac{dx}{\cos x}=\int \frac{d(\sin x)}{1-\sin^2 x}=\frac{1}{2}[\int \frac{d(\sin x)} {1-\sin x} +\int \frac{d(\sin x)}{1+\sin x}] =...=\frac{1}{2} \ln(\frac{1+\sin x}{1-\sin x})+C =...=\ln [\frac{\tan(\frac{x}{2})+1}{\tan(\frac{x}{2})-1}]+C.$$

9. Nov 29, 2004

### devious_

dextercioby, your method was already posted. I was only suggesting another method, which I personally don't think is complicated.

10. Nov 29, 2004

### dextercioby

Maybe it was posted...
Check out that horrible trick u pulled in order to integrate secant of x.You wouldn't expect someone to think of it as simple...Obvious...Besides,it requires a lotta derivatives and it uses the secant function which is (as stated by me) unnecessary...
It don't matter really how u pull an integral off.The trick is to do it as elegantly as possible.As comprehendable as possible.I assume u're not a teacher/never be one.

11. Nov 29, 2004

### devious_

Erm.. I wasn't trying to do the integral "as elegantly as possible". I was merely providing another another way to do it, in addition to the two methods already posted...

12. Nov 29, 2004

### dextercioby

Well,Mr.Devious,apparently u challanged me:
$$\begin {array} {cc} \int \frac{dx}{\cos x} = \int \sec x dx = \int \sec x (\frac {\tan x}{\tan x })dx =^{d(\sec x)=\sec x\tan x dx} \int \frac{d(\sec x)}{\sin x \sec x} \\=^{\sin x=\sqrt{1-\frac{1}{\sec^{2} x}}} \int \frac{d(\sec x)}{\sqrt{\sec^{2} x-1}} =^{\sec x= \cosh \lambda ; \lambda=\cosh^{-1}(\sec x)} \int \frac{(\sinh \lambda) d\lambda}{\sinh \lambda} \\=\lambda +C= \cosh^{-1}(\sec x) +C = \ln(\sec x+\tan x)+C \end{array}$$
,where,of course,the expression $$f^{-1}(x)$$ strands for the inverse of the function $$f(x)$$.It stood for "argcosh (sec x)",but i couldn't find the function,so that's why i used this notation.

Daniel.

Last edited: Nov 29, 2004
13. Nov 29, 2004

### devious_

Challenged you? Why are you taking this personally? :rofl:

$$\int \sec x \; dx = \int \frac{\cos x}{\cos^{2} x} \; dx = \int \frac{\cos x}{1-\sin^{2} x} \; dx$$

Take $u=\sin x$, then $du=\cos x\;dx$. So:

$$\int \sec x \; dx = \int \frac{1}{1-u^{2}} \; du = \tanh^{-1} u \; + \; C = \tanh^{-1}(\sin x) \; + \; C$$

:tongue2:

Last edited: Nov 29, 2004