Suppose I have the first derivative of the function $y$, $\displaystyle \frac{dy}{dx} = g(x)$. Furthermore, suppose I want to obtain the function $y$ by integrating with respect to $x$:
$\displaystyle \int \frac{dy}{dx} dx = \int g(x) ~dx$
Now, I know the result is
$y = G(x) + c$.
However, I would like to know what happens in between these steps. My question is, how does $\displaystyle \int \frac{dy}{dx} dx$ become $y$. Is it due to the fact that $\displaystyle \frac{dy}{dx} dx$ is defined as $dy$, from which I make the substitution so that the integral would be
$\displaystyle \int \frac{dy}{dx} dx = \int g(x) ~dx$
(substitution)
$\displaystyle \int dy = \int g(x) ~dx$,
which we integrate to get $y = G(x) + c$
Or does it have to do something with the chain rule?
PS Sorry if my notation is ambiguous or incorrect, I am just trying to be as generalized as possible.