B Integrating sec(x): Understanding the Answer

  • B
  • Thread starter Thread starter ForceBoy
  • Start date Start date
  • Tags Tags
    Integral
ForceBoy
Messages
47
Reaction score
6
Hello.

I integrated ##\sec(x) ## and got an answer. I differentiated it to verify it and it came out well. Later when I was looking in a table of integrals I saw the solution ## \ln| \sec(x) +\tan(x) | + c##. This was completely different than my solution. I do not think I made a mistake (unless I'm wrongly convinced of something) and I can't see how my answer is related to the given one.

My work:

##I = \int\sec(x) dx ##

## \sec x = \frac{1}{\cos x}## and ##\cos(x) = \frac{e^{ix}+e^{-ix}}{2}## so

##I = \int \frac{2dx}{e^{ix}+e^{-ix}}##

## I = 2 \int \frac{dx}{e^{ix}+e^{-ix}} ##

Multiplication by ##\frac{e^{ix}}{e^{ix}}## yields

## I = 2 \int \frac{e^{ix}dx}{e^{2ix}+1} ##

Let ##u = e^{ix}##
then ##du = i u dx##
so ##\frac{du}{iu} = dx ##

The integral now:
##I = 2\int \frac{u}{u^{2}+1} \frac{du}{iu}##

##I = -2i\int \frac{1}{u^{2}+1}##

We know ##\int \frac{1}{u^{2}+1} = arctan(x)+c##

So it follows that
##I = -2i \arctan(u) + c##

and finally that

##I = -2i \arctan(e^{ix}) + c##

Differentiation:

## \frac{d}{dx}(-2i \arctan(e^{ix})) ##

## -2i \frac{d}{dx}(\arctan(e^{ix})) ##

##t = ix##
##u = e^{t} ##
##v = \arctan(u)##

so

## -2i ( \frac{dv}{du} * \frac{du}{dt} *\frac{dt}{dx}) ##

##-2i(\frac{1}{u^{2}+1}*u*i) ##

##-2i( \frac{i e^{ix}}{e^{2ix}+1}) ##

## -2i(\frac{i e^{ix}}{e^{ix} (e^{ix} +e^{-ix})})##

##-2i(\frac{i}{e^{ix} +e^{-ix}})##

##\frac{2}{e^{ix} +e^{-ix}}##

##\sec(x)##

This is then clearly different than the mentioned solution. I don't see where I could've made a mistake. If I'm right, my solution would require more simplification. I don't see how this could be done.

Any thoughts would be appreciated. Thanks.
 
Physics news on Phys.org
##\int \frac{1}{1+u^2}du=arctan(u)+c## holds only for real u. Here ##u=e^{ix}## is complex.
 
Last edited:
I understand. Would my next step then be to evaluate ##\int \frac{1}{z^{2} +1} dz ## where z is a complex number?
 
Also a question.
mathman said:
##\int \frac{1}{1+u^2}du=arctan(u)+c## holds only for real u. Here ##u=e^{ix}## is complex.

Why is this? In the differentiation of arctan(x), where is it that it is assumed that x is real?
 
Technically you are correct. However arctan(u) when u is complex is not very useful. It is more useful with the form given (ln|...|)..
 
I now saw how to evaluate ## \int \frac{du}{u^2+1} ## for complex u. It's ## \frac{i}{2}\ln|\frac{u+i}{u-i}| ## if I'm not wrong. If I use this instead of ##arctan(u)## I get:

## I = \ln|\frac{e^{ix}+i}{e^{ix}-i}| ##

When looking at this, something tells me it can quickly be expressed as ## \ln|\sec(x)+\tan(x)| ##. Is this right?
 
Last edited:
I just found out how to make it ## \ln|\sec(x)+\tan(x)| ##. I now understand this better and know how to integrate sec(x). Thank you for your help and time. :smile:
 
Back
Top