Conformal symmetry, Weyl symmetry, and a traceless energy-momentum tensor I'm trying to drill down the exact relation between conformal symmetry, Weyl symmetry, and tracelessness of the energy-momentum tensor. However, I'm getting quite confused because every book I can find seems to be treating this subject extremely sloppily. 
First, following the exposition here, a conformal transformation is defined to be a diffeomorphism which satisfies 
$$g'_{\mu\nu}(x') = \Omega^{-2} g_{\mu\nu}(x)$$
followed by a Weyl transformation (i.e. a local rescaling of the metric and fields), so that the composite of the two maps transforms the metric as
$$g_{\mu\nu}(x) \to g'_{\mu\nu}(x') = g_{\mu\nu}(x).$$
In fact, this is already a big source of confusion, because many sources call these diffeomorphisms conformal transformations in themselves, while other sources call Weyl transformations conformal transformations. But as far as I can tell, the "true" conformal transformations people actually use require both of these transformations. In other words, using the common nomenclature, a conformal transformation is a conformal transformation plus a conformal transformation. As far as I can tell, no source defines a conformal transformation explicitly, and most describe it as "a diffeormorphism that preserves angles", which is a completely vacuous statement.
In any case, both steps also affect the matter fields $\Phi$, so the variation of the action under a conformal transformation should have four terms,
$$\delta S = \int_M d^4x \left(\frac{\delta S}{\delta \Phi} (\delta^d \Phi + \delta^w \Phi) + \frac{\delta S}{\delta g_{ab}} (\delta^d g_{ab} + \delta^w g_{ab}) \right)$$
where $\delta^d$ is the variation due to the diffeomorphism and $\delta^w$ is the variation due to the Weyl transformation. Let us number these contributions $\delta S_1$ through $\delta S_4$.
Polchinski performs the derivation in one line, blithely ignoring all terms except for $\delta S_4$. Meanwhile, di Francesco ignores all terms except for $\delta S_1$ (e.g. see Eq. 4.34). This is supposed to be analogous to an argument in chapter 2, which their own errata indicate are completely wrong, because they forgot to include $\delta S_3$. Unfortunately, they didn't correct chapter 4.
In any case, di Francesco claims that tracelessness of the energy-momentum tensor implies conformal invariance, which is the statement $\delta S = 0$. I've been unable to prove this. We know that $\delta S_1 + \delta S_3 = 0$ by diffeomorphism invariance, and $\delta S_4 = 0$ by tracelessness. But that doesn't take care of $\delta S_2$, which is the subject of this question. We cannot say it vanishes on-shell, because symmetries must hold off-shell.
I run into a similar problem trying to prove a converse. Suppose we have conformal invariance. Then $\delta S = 0$, and we know $\delta S_1 + \delta S_3 = 0$. At this point I can't make any further progress without assuming the matter is on-shell, $\delta S_2 = 0$. Then we know $\delta S_4 = 0$, but this does not prove the tracelessness of the energy-momentum tensor, because the Weyl transformation in a conformal transformation is not a general Weyl transformation, but rather is quite restricted. 
In other words, I can't prove either direction, and I think all the proofs I've seen in books are faulty, forgetting about the majority of the terms in the variation. What is going on here?
 A: We have an action which depends on dynamical fields $\phi(x)$ and a background metric $g_{\mu\nu}(x)$ as $S[\phi,g]$. A conformal field theory is invariant under diffeomorphisms and Weyl transformations.

*

*Diffeomorphism Invariance: Under a diffeomorphism $\phi(x) \to \phi^d (x)$, $g_{\mu\nu}(x) \to g^d_{\mu\nu}(x)$. Note how the diffeomorphism transformation is NOT acting on the coordinates, only on the fields. Diffeomorphism invariance implies that
$$
S[\phi^d,g^d]= S[\phi,g]. \tag{1}
$$
If we study infinitesimal diffeomorphisms, we can derive conservation of the stress tensor. Infinitesimally $\phi^d = \phi + {\cal L}_\xi \phi$, $g^d = g + {\cal L}_\xi g$. We then have
\begin{align}
S[\phi^d,g^d] &= S[\phi + {\cal L}_\xi \phi ,g + {\cal L}_\xi g] \\
&= S[\phi,g] + \int d^d x \frac{\delta S}{\delta \phi(x)} {\cal L}_\xi \phi(x) + \int d^d x \frac{ \delta S }{ g_{\mu\nu}(x) } {\cal L}_\xi g_{\mu\nu} (x) \\
&= S[\phi,g] + \int d^d x \frac{\delta S}{\delta \phi(x)} {\cal L}_\xi \phi(x) - \int d^d x \sqrt{-g}  \xi_\nu(x) \nabla_\mu \left[ \frac{2}{\sqrt{-g} } \frac{ \delta S }{ g_{\mu\nu}(x) }\right].
\end{align}
Now, (1) implies
$$
\int d^d x \sqrt{-g}  \xi_\nu(x) \nabla_\mu T^{\mu\nu} = \int d^d x \frac{\delta S}{\delta \phi(x)} {\cal L}_\xi \phi(x) , \qquad T^{\mu\nu} =  \frac{2}{\sqrt{-g} } \frac{ \delta S }{ g_{\mu\nu}(x) }.
$$
The equation above is true ALWAYS. We now put everything on-shell, i.e. the equations of motion for all dynamical fields are satisfied. In this case, the RHS above vanishes and since the equation holds for all vector fields $\xi^\mu(x)$, we have
$$
 \nabla_\mu T^{\mu\nu}(x)  = 0  \qquad \text{(on-shell)}. 
$$


*Weyl Invariance: Under a Weyl transformation $\phi(x) \to \phi^W (x)$, $g_{\mu\nu}(x) \to g^W_{\mu\nu}(x)$. Weyl invariance implies that
$$
S[\phi^W,g^W]= S[\phi,g]. \tag{2}
$$
Following the same procedure as before, by looking at infinitesimal diffeomorphisms, we find
\begin{align}
\int d^d x \sqrt{-g} \omega(x) T^\mu{}_\mu  (x) = - \int d^d x \frac{\delta S}{\delta \phi(x)} \delta_\omega \phi(x). 
\end{align}
The equation above is true ALWAYS. As before, going on-shell and using the fact that $\omega(x)$ is arbitrary, we find
$$
T^\mu{}_\mu(x) = 0  \qquad \text{(on-shell)}. 
$$
Now, none of these transformations are symmetries of the theory since they act non-trivially on the background fields. A symmetry is a transformation of the dynamical fields of the theory (I explained this in a previous answer). However, if we do a special type of diffeomorphism which rescales the metric, we can then remove this rescaling by doing a Weyl transformation. This composite transformation does NOT act on the background fields and
$$
S[\phi^{cd+W} , g ] = S[\phi,g]  .
$$
where by $cd$, I mean "conformal diffeomorphism''.
A: I actually had the same confusion for a long time. Since the diffeo invariance is trivial (by definition), we only consider Weyl transformation. The variation of the action will be of one part in terms of the trace of the stress tensor (by variation of the metric) and one part proportional to the equation of motion (by variation of the field). We can combine the second term with the first one by redefining the stress tensor, that is, adding the term proportional to E.O.M to it. The additional term will not change most Ward (Japanese would want Takahashi as well) identities in the same spirit as page 48 in Di Francesco. However, the "proof" that traceless stress tensor implies conformal symmetry in that book doesn't seem to make sense to me because it omitted the essential transformation of fields. 
Playing with conformal scalar field theory (e.g. page 38 Di Francesco), we can see the traditional stress tensor is only traceless on shell while the generalized one is identically traceless (up to integration by parts).
A: Under the infinitesimal conformal transformation
$$\bar{g}(x)_{\mu\nu} = [1 +\lambda(x)] g(x)_{\mu\nu}$$
$$\bar{\phi} (x)=[1+\lambda(x)]^{p} \phi(x) $$
Using these to evaluate the perturbation, we arrive at:
$$\delta_{c}g_{\mu\nu} = \lambda g_{\mu\nu} $$
$$\delta_{c} \phi \approx p\lambda\phi$$
and the corresponding action becomes
$$\delta_{c}S = \int d^{n}x \left\{ \frac{\partial S}{\partial \phi}\delta_{c} \phi + \frac{\partial S}{\partial g_{\mu \nu}} \delta_{c}g_{\mu\nu}   \right\} =0 $$
Using the equation of motion to hold and expression for $\delta_{c} g_{\mu\nu}$:
$$ \frac{\partial S}{\partial g_{\mu \nu}}  \lambda(x)g_{\mu\nu}  =0 $$
In other words, using $T^{\mu\nu} = \frac{2}{\sqrt{|g|}}\frac{\partial S}{\partial g_{\mu \nu}} $
$$T^{\mu\nu}g_{\mu\nu} =0$$
Which precisely tells us that for the conformal invarience to hold, the stress energy tensor has to be traceless.
