So I am left with this integral after already having done(!) one substitution before (from $dx$ to $dz$): $$ \int \frac{32\tan(z)}{3\pi} \,dz = \int \frac{32\sin(z)}{3\pi\cos(z)} \,dz $$
and wanted to apply the substitution rule where I choose that
$$ u=\cos(z) .$$
Now I'm a little confused as to whether
$$ u'= -\sin(z)\cdot z' \ \text{or} \ u'=-\sin(z) .$$
Wolframalpha tells me the integral is
$$ -\frac{32\log(\cos(z))}{3\pi} , $$
which makes sense, IF $u'=-\sin(z)$. However, if I'd choose that $u'=-\sin(z) \cdot z'$, I would get (after cancelling out $-\sin(z)$)
$$ \int -\frac{32}{3\pi u} \,\frac{du}{-z'} = \int -\frac{32}{3\pi } \cdot \frac{-1}{uz'} \,du $$
which would lead to a whole different integral, because the integral of $-\frac{1}{uz'}$ clearly can't be the simple $\log$ from the wolfram alpha solution... if anyone could help me out on the question which one of the derivatives is right I'd be super super thankful!!
You need to be very careful about notation here. It helps on $u$-substitution not to think about it in terms of $u'$ or $z'$. The prime notation typically incorporates two differentials, which you want to be able to separate. Normally, $u' = \frac{du}{dz}$, but you're treating it like $du$. The integral uses differential notation, so it helps to use differential notation throughout the $u$-substitution process.
Instead of setting $u' = -\sin(z) \cdot z'$, think of it like this:
$$ u = \cos(z) $$ $$ \frac{du}{dz} = -\sin(z) . $$
Then, to transform it from a derivative to differentials, you have
$$ du = \frac{du}{dz} dz $$ $$ du = -\sin(z) dz $$ $$ dz = -\frac{1}{\sin(z)} du . $$
Going back to the integral, we can factor out $\frac{32}{3\pi}$:
$$ \int {\frac{32\sin(z)}{3\pi \cos(z)} \ dz} = \frac{32}{3\pi} \int {\frac{\sin(z)}{\cos(z)} \ dz} $$
Substitute in $u = \cos(z)$:
$$ = \frac{32}{3\pi} \int {\frac{\sin(z)}{u} \ dz} $$
Substitute in $dz = -\frac{1}{\sin(z)} du$:
$$ = \frac{32}{3\pi} \int {\frac{\sin(z)}{u} \frac{du}{-\sin(z)}} $$
Cancel out $\sin(z)$ and factor out the $-1$:
$$ = -\frac{32}{3\pi} \int {\frac{du}{u}} $$
And integrate then substitute back in $u = \cos(z)$:
$$ = -\frac{32}{3\pi} \ln(u) $$ $$ = -\frac{32}{3\pi} \ln(\cos(z)) . $$
With the right notation, the substitution process becomes a lot simpler. With slightly messier notation, it's very easy to get confused.