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<p<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?
 A: 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 > 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}$$
A: I should have thought a bit before asking the silly question in my comment.  I also should have looked at your link.    Clearly if $p$ were an integer we wouldn't be doing the problem this way in the first place.  
Keep in mind that the map $z\mapsto z^p$ is multivalued.  When we write $z^p=r^pe^{i\theta p}$ (with $\theta$ assumed to lie in $(0,2\pi)$ as suggested by our contour), it may look like we're applying the identity $(xy)^p=x^py^p$ to $z=re^{i\theta},$ but what we're really doing is making the choice as to which value of $z^p$ we're going to take.  The actual values of $z^p$ are $r^pe^{i\theta p}e^{2\pi inp}.$  What we are doing is to choose $n=0.$
Why do we make this particular choice?  Well, we want the values of $z^p$ to agree with the values of the real function $x^p$ when we are on the piece of the contour that lies just above the real axis, which it does if $n=0$ since $\theta$ is close to $0.$  Of course we have to use the same choice throughout the entire contour since we don't want our function to have any discontinuities.  If you think about it, that is why we have to remove the positive real axis from our contour: once you go $360^\circ$ or more around the origin, you will necessarily encounter the multivaluedness of $z^p.$
A: 
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.
