TITLE: Understanding if $\sin x = t$ then $\cos x dx = dt$
QUESTION [6 upvotes]: Hi I need help in understanding this:
if $\sin x = t$ then $\cos x dx = dt$.
My math book mostly uses the Lagrange's notation (prime) and I think I may not fully have grasped the $\frac{dx}{dy}$ way of writing and calculating the derivative of a function, since I am having a hard time to truely understand the statement above. 
If anyone can give some explanation on how this logic works, I would be more than happy :)
Thank you!

REPLY [3 votes]: Let $y=f(x)$ be a real function. If $f(x)$ is differentiable at  $x_0$, then the the expression $$dy=f'(x_0)dx$$ is called the differential of $f$ at $x_0$. 
Or using the Leibniz's notation for the derivatives
$$dy=\left. \frac{df}{dx}\right\vert _{x_{0}}\; dx$$
For a generic $x$, we thus have
$$dy=f'(x)dx=\frac{df}{dx} dx$$
In the picture below this equation in $dx,dy$ represents the tangent line to the graph of $f(x)$ at $x_0$ in the translated coordinates system $dx,dy$.
Both $dy$ and $dx$ are interpreted as infinitesimals. The differential $dy$ is approximately the change of $y$ when $x$ changes by an arbitrary small quantity $dx$. 

In the present case we have the function $t=f(x)=\sin x$, whose derivative is 
$$t^{\prime }=f^{\prime }(x)=\frac{df}{dx}=\cos x.$$ So, the diferential $dt$ is 
$$dt=f^{\prime }(x)dx=\frac{df}{dx}dx=\cos x\;dx.$$
Further information on the answer to the question What is, how do you use, and why do you use differentials? What are their practical uses?