$\DeclareMathOperator{\Log}{Log}$
I have several problems to understand the concept of branches and how to find analytic branches.
From what I learned, for example for the complex logarithm, it is a multi valued function, and if we want it to be analytic we have to cut some part of the domain (because otherwise we get different limits in the same point).
I understand then why $\Log(z)$ is analytic in the branch $\mathbb{C} \setminus (-\infty ,0]$ , since we can never complete a full circle around $0$. Here it is a simple case so it is easy to see that we always need to throw a ray from the origin.
My confusion starts when the function is not that simple. Let's take the function $Log(z^2-1)$ . I can understand why on the domain $\{ |z| < 1\}$ an analytic branch would be $\mathbb{C} \setminus [0,\infty )$, since this function takes the unit circle to itself and moves it left by $1$. So, the ray $[0,\infty )$ doesn't intersect with it.
But what if the domain is $\{ |z| > 1\}$ ? How do I work with it since there is not such a pretty way? I thought of maybe using the main branch of the logarithm, and seeing where $z^2-1 \in (-\infty ,0]$, but is it what needs to be done.
Moreover, what about functions like $\sqrt{z^2-1}$ ? How do I start to look for an analytic branch there? It seems logical that the points $1$ and $-1$ play a part here but I am not sure how.
Another thing is, how do I solve integral with such functions? For example $$\int_{|z| = 2} \sqrt{z^2-1}$$ When the branch is defined in the following way: $$\sqrt{z^2-1} = z\sqrt{1-\frac {1}{z^2}} = z\exp[\frac{1}{2}Log(1-\frac {1}{z^2})]$$
How does the definition of the branch even play a part here?
Another example could be the integral: $$\int_{|z|=2} \frac{1}{\sqrt{z^4+4z+1}}$$ when $\sqrt{25} = 5$
Help would be tremendously appreciated. I someone could walk me thorugh an entire example, I would be really glad.
As you have hinted to, Branch cuts are required to help defined analytic functions by removing the "multivaluedness" of the function without losing any information about the domain of the function (i.e. the same function but with different branch cuts which both preserve regularity are equal to each other by analytic continuation).
The position of the cuts are chosen along lines which otherwise would lend the function to be discontinuous across the cut. For example, for a branch cut to be required to preserve regularity the following must hold,
$$f(z) \Big \vert_{\text{before proposed cut}}^{\text{after proposed cut}}\ne0.$$
If $f(z) \Big \vert_{\text{before proposed cut}}^{\text{after proposed cut}}=0$, then the branch cut would not be required in this position.
The common cuts to consider are those which are themselves rays of rotational symmetry for the complex function. For example, an equation containing a cube root we know by the theory of complex roots of unity, the equation is multivalued in the $(-\infty,\infty]$ plane of order 3. So it is important to consider what specifically about the function is creating this multivalued behaviour. In our case, it is the square root sign (and nothing to do with the $z^2$).
I know this isn't a definitive walk through but it should push you in the right direction.