it's just convention to have dx at the end of an integral expression, it's completely unnecessary though, because dx (derivative of x) is 1, so you're multiplying the expression by 1 which doesn't do anything of course
du and dv (and so on) are neccesary in substitution because they usually represent more important expressions that will change the result as a whole, like du in the original problem; derivative of u (= tan²x) is [tanx-x]
and '/ u dv' came from here: