If one has to use the chain rule repeatedly, such as in the problem $y=\cos(2u)$ and $u=3x+1$, would $u$ be viewed as a constant? There's an easier way to solve this function by simply making $u=6x+2$ but this is just for an example.
I know that the derivative $\frac{du}{dx}$ is $3$.
I know that the derivative of $\cos(2u)$ would be equal to $-2\sin(2u)$ since $2u=j$ and $f'(\cos(j))\times f'(2u)=-2\sin(2u)$. However, in solving $\cos(2u)$, its actual value of $3x+1$ was removed, since the actual derivative of $2u$ with the value of $u$ plugged in would be $6$.
Why would you treat $u$ as completely independent from its actual value when using the chain rule (until you plug it back in)?
Nothing is being removed. It’s just another way of reaching the same answer. According to the Chain Rule, we have the following:
$\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}$ when $y = f(u)$ and $u = g(x)$
Here, $u = 3x+1$ and $y = \cos(2u) \implies y = \cos(2(3x+1))$.
$$\frac{dy}{dx} = \frac{d}{du}\cos(2u) \cdot \frac{d}{dx}(2u)$$
$$\frac{dy}{dx} = (2u)’\cdot-\sin(2u)$$
$$u = 3x+1 \implies \frac{dy}{dx} = (6x+2)’\cdot -\sin(6x+2)$$
$$\frac{dy}{dx} = -6\sin(6x+2)$$
In examples like this, of course, solving for $y = \cos(6x+2)$ is pretty quick, getting the same answer, just as you mentioned.