# Trig identity that I'm missing

1. Nov 17, 2012

### Woopydalan

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

Last edited: Nov 17, 2012
2. Nov 17, 2012

### MarneMath

I'm reading (1/2)[-sec(x)]^2 + C, in which case they might've used [tan(x)]^2 = [sec(x)]^2-1

3. Nov 17, 2012

### Woopydalan

Ahh I was misreading it, thanks.

4. Nov 17, 2012

### Staff: Mentor

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.