Given that I have this function that I want to differentiate.
$$ f(x) = \frac{\cos(x) \sin(x)}{2x+1} $$
I know that I can do this with quotient and product rule, but I would like to understand chain rule fully on this one.
So I say $ z(x) = \cos(x) \sin(x) $ and alter my original problem:
$$ h(x) = \frac{z(x)}{2x+1} $$
Now, would I still do $\frac{\mathrm d}{\mathrm dx}$ or $\frac{\mathrm d}{\mathrm dz(x)}$?
If I do the latter, I will get:
$$ \frac{\mathrm d}{\mathrm dz(x)} h(x) = \frac{\mathrm d}{\mathrm dz(x)}\frac{z(x)}{2x+1} = \frac{1}{2x-1}$$
If I replace $z(x)$ with what I had before, I will not get the right result at all, I will just get the $f(x)$ back.
Then I tried to apply chain rule, like this:
$$ \frac{\mathrm d}{\mathrm dz(x)} h(x) = \frac{\mathrm d}{\mathrm dz(x)} \frac{z(x)}{2x+1} \frac{\mathrm d}{\mathrm dx} z(x) = \frac{\cos(x)^2- \sin(x)^2}{2x-1}$$
Which is not correct either, since the $\cos(x) \sin(x)$ term is missing.
Differentiating against plain $x$:
$$ \frac{\mathrm d}{\mathrm dx} h(x) = \frac{\mathrm d}{\mathrm dx} \frac{z(x)}{2x+1} = \frac{z'(x)(2x-1)-2z(x)}{2x-1}$$
Now I did not use the chain rule to get the right result. If I slap another $z'(x)$ on there, as the inner derivative, I get too much.
So how would I use the chain rule the right way in this problem?