How to approach integrals in the form $\int R(x,x^{\frac{m}{n}},x^{\frac{r}{s}}...)dx$
where $R(x,x^{\frac{m}{n}},x^{\frac{r}{s}})$ represents a fraction in terms of roots:
I was told to use the substitution $x=t^k$ where k is the least common multiple of the denominators of exponents of x
let's do an example:
$$\int \frac{dx}{x-\sqrt{x}}$$
$lcm(1,2) = 2$
hence $x=t^2$ and $dx=2tdt$ then:
$$\int\frac{2tdt}{t^2-t}$$ $$2\int\frac{dt}{t-1} = 2ln|(t-1)|=2ln|\sqrt{x}-1|$$
I was told in my class to use this method but I was never told WHY it works I would like to have a deeper understanding of why this method works and also see if there are more methods to approach integrals of that form
Suppose we have a rational function $R(u_1, \ldots, u_m)$ and rational numbers $\frac{p_1}{q_1}, \ldots, \frac{p_m}{q_m}$, and denote $q := \operatorname{lcm}(q_1, \ldots, q_m)$. Then, we can rewrite each rational number $\frac{p_i}{q_i}$ as $\frac{r_i}{q}$ for some integer $r_i$. In terms of $t := x^q$, we have $x^\frac{r_i}{q} = (t^q)^{\frac{r_i}{q}} = t^{r_i}$, and $dx = q t^{q - 1} \,dt$, so that substitution gives $$\int R\left(x^\frac{p_1}{q_1}, \ldots, x^\frac{p_m}{q_m}\right) \,dx = q \int R(t^{r_1}, \ldots, t^{r_m}) t^{q - 1} \,dt .$$ In particular, the integrand of the integral in $t$ is a product of rational functions of $t$ and hence is itself rational in $t$. But (provided you can express the roots of its denominator) you can always evaluate an indefinite integral of a rational function in a closed form in terms of elementary functions.
Example We can generalize the example in the question statement: For any integer $q > 1$, the substitution $x = t^q$ gives $$\int \frac{dx}{x - x^{1 / q}} = q \int \frac{t^{q - 2} \,dt}{t^{q - 1} - 1},$$ and the substitution $u = t^{q - 1} - 1$ transforms the integral to $$\frac{q}{q - 1} \int \frac{du}{u} = \frac{q}{q - 1} \log |u| + C = \frac{q}{q - 1} \log \left\vert x^{(q - 1) / q} - 1\right\vert + C$$