Evaluating : $\int \sqrt{1 + \sqrt{z+1}}dz $ under valid conditions 
Q: Evaluate $\displaystyle \int \sqrt{1 + \sqrt{z+1}}dz $ stating the conditions under which your result is valid?

Previous Question::

Show that if we restrict ourselves to the same branch of the square root,
   $\displaystyle \int z \sqrt{2z + 5} dz = \frac{1}{20} (2z + 5)^{5/2} - \frac{5}{5} (2z + 5)^{3/2} + C$

My Question is what does it mean by restricting ourselves with same branch? In previous question does that mean we are restricting $\arg (z) $ only to $0 - 2 \pi$ or $2\pi - 4 \pi$ around $-5/2$? What would happen if we do not restrict ourselves with particular branch? Is first question "conditions under which your result is valid" only when we restrict to particular branch?
 A: By restricting to a single branch of the square root, we are constructing a single-valued function from an inherently multi-valued function.  
A common branch of the square root function is the negative real axis.  Consider a unit circle that begins on the positive real axis and moves along in both the positive and negative directions; that is, $\theta \in [0,\pi)$ counterclockwise, and $\theta \in [0,-\pi)$ clockwise.  At the branch, the angle may be $\pi$ or $-\pi$.  While this doesn't matter for single-valued functions, for the square root, it makes the difference between $\pm i$.  If we cross the branch in either direction, what happens?  How should we define $\theta$?
That's why we define a branch such that no crossing of the branch, i.e., the negative real axis, is allowed.  We then define $\theta \in (-\pi,\pi]$ and avoid any path that might cross the branch.
For your example
$$\int dz \: \sqrt{1+\sqrt{1+z}}$$
there is a branch point at $z=-1$.  We define the branch to be the ray $z \in (-\infty,-1)$.  Using the above as a guideline, we have $\theta = \arg{(z+1)} \in (-\pi, \pi]$.
Now let $\sqrt{1+z} = r\, e^{i \theta/2}$, where $r = |\sqrt{1+z}| \in (0,\infty)$. Then you can show that
$$\phi = \arg{\sqrt{1+\sqrt{1+z}}} = \frac{1}{2} \arctan{\left [ \frac{r \sin{(\theta/2)}}{1+r\,\cos{(\theta/2)}}\right]}$$
From this, you can deduce that $\phi \in [-\pi/4,\pi/4]$.  This then defines the range of allowable phases that make the integrand a single-valued function. 
For your previous question, you want $\arg{(2 z+5)} \in (-\pi, \pi]$.  The branch may be defined as the set of points in the interval $(-\infty,-5/2]$. 
