Possible Duplicates:
Evaluating $\\int P(\\sin x, \\cos x) \\text{d}x$
Ways to evaluate $\int \sec \theta \, \mathrm d \theta$

Using Mathematica to get the antiderivative for sec(x), I get $$-\log(\cos\frac{x}{2}-\sin\frac{x}{2})+\log(\cos\frac{x}{2}+\sin\frac{x}{2}).$$

This doesn't look familiar, so, I'm thinking there's probably some identity or other way to transform this...

Any insight would be appreciated.


marked as duplicate by Arturo Magidin, t.b., Américo Tavares, Aryabhata, Qiaochu Yuan Mar 31 '11 at 19:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    $\begingroup$ This falls under math.stackexchange.com/questions/29980/… $\endgroup$ – Arturo Magidin Mar 31 '11 at 18:34
  • $\begingroup$ For $\sec(x)\tan(x)$, this is the derivative of $\sec(x)$. For $\sec(x)$ it's more complicated, but Weierstrass substitution works (in the worse case scenario). $\endgroup$ – Arturo Magidin Mar 31 '11 at 18:38
  • $\begingroup$ @Arturo: I updated 29980 to include rational functions. I believe your current answer addresses that, but notifying you, just in case you think it might need editing. $\endgroup$ – Aryabhata Mar 31 '11 at 18:48
  • $\begingroup$ @NateyG: No, there is no particularly simpler form, though some tables list it as $\log(\sec x + \tan x)+C$, $\log(\tan(\frac{x}{2}+\frac{\pi}{4})) + C$, or $\frac{1}{2}\ln|\sin x + 1| - \frac{1}{2}\ln|\sin x - 1| + C$. $\endgroup$ – Arturo Magidin Mar 31 '11 at 18:55
  • 2
    $\begingroup$ The Antiderivative of $\sec(x)$ was already asked in this question math.stackexchange.com/questions/6695/… "ways to evaluate integral sec" $\endgroup$ – Américo Tavares Mar 31 '11 at 18:59

$$\begin{align} \int\sec x\;dx &=\int\sec x\cdot\frac{\sec x+\tan x}{\sec x+\tan x}\;dx \\ &=\int\frac{\sec^2x+\sec x\tan x}{\sec x+\tan x}\;dx \\ (\text{Letting }u=\sec x+\tan x&\text{ and }du=\sec x\tan x+\sec^2 x\;dx) \\ &=\int\frac{du}{u} \\ &=\log|u|+C \\ &=\log|\sec x+\tan x|+C \end{align}$$

Now, the output I get from Mathematica is: $$\begin{align} -\log(\cos\frac{x}{2}-\sin\frac{x}{2})+\log(\cos\frac{x}{2}+\sin\frac{x}{2}) &=\log\left(\frac{\cos\frac{x}{2}+\sin\frac{x}{2}}{\cos\frac{x}{2}-\sin\frac{x}{2}}\right) \\ &=\log\left(\frac{(\cos\frac{x}{2}+\sin\frac{x}{2})^2}{(\cos\frac{x}{2}-\sin\frac{x}{2})(\cos\frac{x}{2}+\sin\frac{x}{2})}\right) \\ &=\log\left(\frac{\cos^2\frac{x}{2}+\sin^2\frac{x}{2}+2\sin\frac{x}{2}\cos\frac{x}{2}}{\cos^2\frac{x}{2}-\sin^2\frac{x}{2}}\right) \\ &=\log\left(\frac{1+\sin(2\cdot\frac{x}{2})}{\cos(2\cdot\frac{x}{2})}\right) \\ &=\log\left(\frac{1+\sin x}{\cos x}\right) \\ &=\log(\sec x+\tan x) \end{align}$$


$\sec x\tan x=\frac{\sin x}{\cos^2 x}=-\frac{du}{dx}\frac{1}{u^2}$ where $u=\cos x$


Not the answer you're looking for? Browse other questions tagged or ask your own question.