How to properly understand branches of complex functions $\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.
 A: $\log(z^2-1)$ is a standard analytic function on $|z-2| < 1$ (or $\Bbb{C}- [1,\infty)-(-\infty,-1]$, or ...) then what you need is to see all its possible analytic continuations. In general those can be very complicated (see the branch point $z=1$ of $\log \log z$ which isn't in  $\log(2i \pi +\log z)$ )
Sometimes "all the analytic continuation" can be described in a very simple way. For this what you need is the monodromy group : that is how $f(z)$ transforms under analytic continuation along curves in the homotopy group. For example $ f(z) = z^{1/3}$, its homotopy group is the closed curves around $z=0$, along a counterclockwise rotation $C_0$ around $z=0$, $f(z)$ transforms into $f_{C_0}(z) = e^{2i \pi /3} f(z)$ so $f_{C_0^n}(z)$ transforms into $f_{C_0^{n+1}}(z)=e^{2i \pi /3} f_{C_0^n}(z)$, thus the monodromy group is  of order $3$. 
For $\log z$ the monodromy group is generated by $C_0$ which sends $f(z)$ to $f(z)+2i\pi$ and is $\cong \Bbb{Z}$. 
For $f(z) = (z-1)^{1/2} (z+1)^{1/2}$ the monodromy group is generated by $C_1,C_{-1}$, $f_{C_1}(z) = -f(z), f_{C_{-1}}(z) = -f(z), f_{C_1 C_{-1}}=f_{C_{-1} C_1} = f$.
A: 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.
A: The concept of multivalued complex functions is related to the concept of Riemann surfaces. They are complex manifolds of dimension one, that is they locally look like complex plane, but their global may be different. Multivalued function can be seen as an ordinary, single-valued function but on a particular Riemann surface. 
Choosing a branch of a function is equivalent to identifying  $\mathbb C$, with the exception of the branch cut, with an isomorphic subset of the Riemann surface. It's never a unique procedure, and the branches of a function, as well as branch cuts can be chosen in many various ways - only the branch points, the ends of the branch cuts, are fixed.
When doing so, the two sides of the branch cut get separated, and this is related to the discontinuity of a function on the brunch cut (because the points of $\mathbb C$ on both sides of the branch cut corresponds to completely different regions of the Riemann surface, there's no a priori reason for the function defined on this surface to have equal values in these different regions, even if its continuous).
This is also a reason why a curve closed in $\mathbb C$, but passing through a branch cut, becomes an open curve when "lifted" to a Riemann surface. That is why, if you want to use Cauchy formula, it's important to choose a curve in a way that it doesn't interesct the branch cut; or lokking at in in a different way, choosing the branch cut in a way that it doesn't interesct the integration curve.
That's why, when calculating $$ \oint_{|z|=2} \sqrt{z^2-1} dz$$one represents $$ \sqrt{z^2-1} = z \exp\big(\frac12\log(1-z^{-2})\big)$$ to have a good control on where the branch cut is. Gor the logarithm $\log w$ we can consistently choose the branch cut for $w\in (-\infty,0]$, and that translates to function $\sqrt{z^2-1}$ defined with the brach cut for $1-z^{-2}\in (-\infty,0]$, that is $z\in[-1,1]$. Having made sure that the integfration curve does does not intersect the branch cut, that is, it is really a closed curve, we can use formula $z \exp\big(\frac12\log(1-z^{-2})\big)$ to find the Laurent series and calculate the integral.
Choosing the branch cut is only part of the work, as you need to choose the branch of the function as well, that is, choose which region of the Riemann surface you identify with $\mathbb C$. Depending on your choice, your function can have different values, for example the values of $\log z$ vary by a multiplicity of $2\pi i$ between different branches; Thess various choices of value for logarithm produce various values for $\sqrt{z^2-1}$ - choosing a value of logarithm that differs by $2\pi i$ changes $\frac12 \log(..)$ by $\pi i$, so the final results differs by a factor $e^{\pi i}=-1$.
In case of $\frac{1}{\sqrt{z^2+4z+1}}$ and circle $|z|=2$, you can find that one of the branch points lies inside ther circle ($z=-2+\sqrt{3}$) and one outide ($z=-2-\sqrt{3}$). This unfortunately meens that you cannot choose the branch cut in a way that it doesn't cross the curve, and this in turn means that there's no way to define function $\frac{1}{\sqrt{z^2+4z+1}}$ in such a way that it is continuous on the circle $|z|=2$. Depending on where you put the branch cut, and which branch of the function you choose, you'll be getting different results. The integral can still be calculated, but it is essentialy calculating an integral over on open curve, and no Cauchhy formulae or Laurent series will be useful.
