Can we *ever* use certain log/exp identities in the complex case? This article on Wikipedia points out that certain identities for the log and exponential functions which are familiar from the real case require care when used in the complex case. Failures in the following identities are pointed out 

$$\log{z^w} \equiv w \log {z}\\(zw)^{\omega}\equiv z^{\omega}w^{\omega}\\e^{zw} \equiv (e^z)^w$$

The article alludes to the fact that the identities do not always work, even if we consider them as an assertion about equalities of sets (and consider the functions as multivalued). 

Now, how can we work with these identities without leading ourselves into error? Is the answer simply never to employ them in the presence of a complex base or exponent? Occasionally I see uses of these identities; here is one example:

Here is a scanned page from Schaum's outline on complex variables which shows how to evaluate $\int_{0}^{\infty}\frac{x^{p-1}}{1+x}dx$ with a keyhole contour (for $0&lt;p&lt;1$). As usual, on the return path, we have to parameterize the path as $z = e^{2\pi i}x$, $x\in \mathbb{R}$, rather than simply $z=x$. Now when the author exponentiates this term, he uses $(x e^{2\pi i})^{p-1}=x^{p-1}e^{2\pi i(p-1)}$, employing the second identity above. What justifies this, given that the identity does not hold in general?
By definition $z^w = e^{w \log(z)}$ (for whichever branch of $\log(z)$ you are using), so 
$$ \log(z^w) = w \log(z) + 2 \pi i n$$
for some integer $n$.   If, for example, you are using the branch of $\log$ that has imaginary part in $(\alpha, \alpha + 2 \pi]$, you choose $n$ so that the imaginary part is in that interval.

Similarly, $(zw)^\omega = e^{\omega \log(zw)}$, and $\log(zw) = \log(z) + \log(w) + 2 \pi i n$ for suitable integer $n$, so 
$$(zw)^\omega = e^{\omega(\log(z) + \log(w) + 2 \pi i n)} = e^{2 \pi i n \omega} z^\omega w^\omega $$

And
$$(e^z)^w  = e^{w \log(e^z)} = e^{w (z + 2 \pi i n)} = e^{2 \pi i n w} e^{wz}$$

EDIT: In Schaum's example, it is misleading to write $z = e^{2 \pi i} x$ (which would be the same as $x$), it's really $e^{(2 \pi - \epsilon) i} x$ where $\epsilon &gt; 0$ is arbitrarily small.
Then $\log(z) = \log(x) + (2 \pi - \epsilon) i$ (for the branch of log with imaginary part in $[0, 2 \pi)$), and $$z^{p-1} = e^{(p-1)\log(z)} = e^{(p-1)\log(x) + (p-1)(2\pi - \epsilon) i} = x^{p-1} e^{(p-1)(2\pi - \epsilon) i}$$
Can we ever use certain log/exp identities in the complex case?


Two answers:


Can we ever use them?  Yes.
Can we blindly use them?  No.


For example: That computation from Schaum's can be done along those lines.  By applying these identities carefully.  Not by applying them blindly.