## Trig identity that I'm missing

I am trying to integrate -tan(x)sec^2(x) and getting -tan^2(x) / 2. When I put it in wolfram alpha it gets the same answer when I press show solution, but without pressing it it shows -sec(x)/2.

So I am wondering, is it the case tan^2(x) = sec(x)?? I don't remember this as a correct trig identity

http://www.wolframalpha.com/input/?i=-tan%28x%29sec^2%28x%29+integral

Notice the difference in answer when you press for the show step by step solution
 Blog Entries: 2 I'm reading (1/2)[-sec(x)]^2 + C, in which case they might've used [tan(x)]^2 = [sec(x)]^2-1
 Ahh I was misreading it, thanks.

Mentor

## Trig identity that I'm missing

In indefinite integral can have different answers, depending on the technique that is used, but the answers can differ by at most a constant.

When you integrated -tan(x)sec2(x) you got -(1/2)tan2(x). Wolfram's answer was -(1/2)sec2(x). Since sec2(x) = tan2(x) + 1, your answer and Wolfram's answer differ by a constant.