This is a simple matter of not understanding the chain rule, that’s all (it’s hard!).
When you say that the derivative of $\sin({3x})$ is $\cos(3x)$, that is actually true! - but only if you’re differentiating with respect to $3x$.
Observe:
$\frac{d}{dy}\sin(y) = \cos(y)$
Let $y=3x$. Then
$\frac{d}{d(3x)}\sin(3x) = \cos(3x)$
If you differentiate with respect to the thing you’re taking the $\sin$ of, you get $\cos$ of that thing; that is, when the variable in denominator of $\frac{d}{dy}$ (which is $y$ right here!) exactly matches the variable that the function $\sin(y)$ is of (also $y$ right here!), then the derivative is just as you calculated: $\cos(y)$.
But you’re NOT asked to differentiate with respect to $3x$; you’re asked to differentiate with respect to $x$! Since $x$ is NOT the thing we're taking $\sin$ of (it's $3x$!), the Chain Rule tells us that after we differentiate with respect to $3x$, we must multiply by the derivative of $3x$ with respect to $x$; that is, $3$.
Again, observe:
$\frac{d}{d\color{blue}{x}} \sin(\color{red}{3x}) = \frac{d}{d(\color{red}{3x})}\sin(\color{red}{3x}) \cdot \frac{d}{d\color{blue}{x}} (3\color{blue}{x})$
Since $\frac{d}{d(\color{red}{3x})}\sin(\color{red}{3x}) = \cos(\color{red}{3x})$, and $\frac{d}{d\color{blue}{x}}(3\color{blue}{x}) = 3$, then
$\frac{d}{dx} \sin(3x) = (\cos(3x)) \cdot 3$
Edit:
When I say "with respect to", technically what I mean is "how does this function change as this one variable changes". But you don't really need to fully wrap your head around that to be able to use the Chain Rule. Let's just say it means "the 'something' in $\frac{d}{d(something)}$".
For example, let's say we wanted to find the derivative of the function $ax^2$ with respect to $x$. That is, we want to calculate $\frac{d}{dx} ax^2$. That means that we will treat $x$ as the variable and $a$ as some constant (as if it were the number $3$). By the Power Rule, this would differentiate to $2ax$.
However, we could also make an assumption that $a$ is the variable in this function, and we want to find the derivative with respect to $a$. That is, we want to calculate $\frac{d}{da} ax^2$. (Notice $a$ is now the 'something' in $\frac{d}{d(something)}$). In this instance, we will treat $a$ as the variable and $x^2$ as some constant (as if it were the number $3$). Now this thing is just a constant times a variable, so it differentiates to the constant $x^2$.
Finally, let's consider what would happen if we treated the whole of $x^2$ as the variable (rather than just $x$), and we want to find the derivative of $ax^2$ with respect to $x^2$; i.e. to find $\frac{d}{d(x^2)} ax^2$. This means that we'll once again treat $a$ as constant, but now $x^2$ will be treated as the entire variable. To calculate this, we have a constant times a variable, which merely differentiates to a constant - meaning $\frac{d}{d(x^2)} ax^2 = a$.
Does this help?
Best Answer
One way is to recall the identity $\sin 2x=2\sin x\cos x$, which can be rewritten as $$\sin x\cos x=\frac{1}{2}\sin 2x.$$ Now differentiate, not forgetting to use the Chain Rule.
An alternative is to differentiate $\cos x\sin x$ immediately, using the Product Rule. We get $(\cos x)(\cos x)+(-\sin x)(\sin x)=\cos^2 x-\sin^2 x$. Then recall the identity $\cos 2x=\cos^2 x-\sin^2 x$.