I have worked out ∫ tan(x) dx -∏/6<x<∏/3

to 0.5493 to 4d.p.

But I'm checking things through & would like some clarification, please.

Using trig definitions I let tan(x) = sin(x)/cos(x)

then I used substitution

let u = cos(x) so du/dx = -sin(x)

du = -sin(x) dx

& - du/sin(x) = dx

-∫ sin(x)/u * du/sin(x) = du/u as sin(x) cancels.

[-ln(u)] -∏/6<x<∏/3

=0.5493 to 4d.p.

Having looked at several other places

MathDoctorBob

shows that ∫tan(x) = ln(sec(x))+c

clindelof

shows the way I did it.

& my Stroud engineering maths says ∫tan(x) = sec^{2}x

WolframAlpha gets the same answer as me, too.

So am I right?