Hi everyone, this is my 1st post! I am returning back to school after 5 years off and reviewing my calc and physics to be ready. I'm having problems with this integration problem though. I found the right answer solving it one way but when trying another way to solve it I can't.

integral {tan(z)/cos^2(z)}dz

intergal {tan(z)}{sec^2(z)}dz

so u=tan(z) and du=sec^2(z)dz

intergal udu

{(u^2)/2} + C

(1/2){tan^2(z)} + C

ok so that answer is correct, now I'm going to try it the other way I've been trying and can someone point out what I'm doing wrong

integral {tan(z)/cos^2(z)}dz

intergal {sin(z)/cos^3(z)}dz

intergal {sin(z)}{cos^-3(z)}dz

so u=cos(z) and du=-sin(z)dz

- intergal {u^-3}du

- {-1/2}{u^-2}

{1/2}{1/cos^2}

I just can't figure out what i'm doing wrong. Any help would be great thanks.

[/tex][/list]