$\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.