How to show that an analytic function can be written as $g(z)^k$? Let $f$ be an analytic function with $f(z_0) = 0$ and $f \neq 0$. Let $k = gr(f, z_0) \geq 1$. Show that there exists an analytic function $g$ such that locally, $g(z)^k = f(z)$.

I know that if $f(z) \neq 0$ for all $z$, then i could let $h$ be the antiderivative of $f'/f$, so that $f(z)e^{-h(z)}$ is a constant, and finally write $f$ as $f(z) = ce^{h(z)}$, and then lastly, i could let $g(z) = c^{1/k}e^{h(z)/k}$

But this technique doesn't work in this case, since f can't be written as $e^{h(z)}$.

How should i go on about this?

Thank you.
I think i managed to solve it.

Since $f$ is analytic, it can be written as

$$f(z) = \sum_{n = 0}^{\infty} a_n (z - z_0)^n$$

And because $gr(f, z_0) = k$ we have that

$$f(z) = \sum_{n = k}^{\infty} a_n (z - z_0)^n$$

$$ = \sum_{n = 0}^{\infty} a_{n+ k} (z - z_0)^{n+k}$$

$$ = (z - z_0)^{k} \sum_{n = 0}^{\infty} a_{n+ k} (z - z_0)^{n}$$

$$ = (z - z_0)^{k} \sum_{n = 0}^{\infty} b_{n} (z - z_0)^{n}$$

where $b_n = a_{n+k}$. Let us name this new function as $r(z) = \sum_{n = 0}^{\infty} b_{n} (z - z_0)^{n}$. Now, since $b_0 = a_k \neq 0$, we have that $r(z_0) \neq 0$.

$r$ is clearly analytic, and since it is not $0$, then $\frac{r'}{r}$ is analytic. Let $h$ be it's antiderivative.

Now, notice that 

$$(r(z)e^{-h(z)})' = r'(z)e^{-h(z)} - r(z)e^{-h(z)}h'(z) =r'(z)e^{-h(z)} - r(z)e^{-h(z)}\frac{r'(z)}{r(z)} = 0$$

Therefore, $r(z)e^{-h(z)} = c$, and we conclude that $r(z) = ce^{h(z)}$.

Replacing this in the expression of $f$ we conclude that

$f(z) = (z - z_0)^kce^{h(z)}$. Now writing $g(z) = (z - z_0)c^{1/k}e^{\frac{h(z)}{k}}$, we can see that $g(z)^k = f(z)$
I think i managed to solve it.

Since $f$ is analytic, it can be written as

$$f(z) = \sum_{n = 0}^{\infty} a_n (z - z_0)^n$$

And because $gr(f, z_0) = k$ we have that

$$f(z) = \sum_{n = k}^{\infty} a_n (z - z_0)^n$$

$$ = \sum_{n = 0}^{\infty} a_{n+ k} (z - z_0)^{n+k}$$

$$ = (z - z_0)^{k} \sum_{n = 0}^{\infty} a_{n+ k} (z - z_0)^{n}$$

$$ = (z - z_0)^{k} \sum_{n = 0}^{\infty} b_{n} (z - z_0)^{n}$$

where $b_n = a_{n+k}$. Let us name this new function as $r(z) = \sum_{n = 0}^{\infty} b_{n} (z - z_0)^{n}$. Now, since $b_0 = a_k \neq 0$, we have that $r(z_0) \neq 0$.

$r$ is clearly analytic, and since it is not $0$, then $\frac{r'}{r}$ is analytic. Let $h$ be it's antiderivative.

Now, notice that 

$$(r(z)e^{-h(z)})' = r'(z)e^{-h(z)} - r(z)e^{-h(z)}h'(z) =r'(z)e^{-h(z)} - r(z)e^{-h(z)}\frac{r'(z)}{r(z)} = 0$$

Therefore, $r(z)e^{-h(z)} = c$, and we conclude that $r(z) = ce^{h(z)}$.

Replacing this in the expression of $f$ we conclude that

$f(z) = (z - z_0)^kce^{h(z)}$. Now writing $g(z) = (z - z_0)c^{1/k}e^{\frac{h(z)}{k}}$, we can see that $g(z)^k = f(z)$