Equations of motion for Polyakov action In Polchinski 2.1.10 we have the action in terms of complex coordinates 
$$S = \frac{1}{2\pi \alpha'} \int d^{2}z \partial X^{\mu}\bar{\partial}X_{\mu}\tag{2.1.10}$$ 
This should be a rather trivial question but how exactly is the equation of motion $$\partial \bar{\partial} X^{\mu}(z,\bar{z}) = 0\tag{2.1.11}$$ derived? The EoM was previously derived by varying the metric but in this case, how exactly are we obtaining the EoM by varying the action?
 A: You can either vary the action directly, or apply the classical field theory Euler-Lagrange equations. The latter for a Lagrangian $\mathcal{L}(\phi^{\alpha}, \partial_{\mu}\phi^{\alpha})$ read
$$\frac{\partial \mathcal{L}}{\partial \phi^{\alpha}} - \partial_{\mu}\Big(\frac{\partial\mathcal{L}}{\partial(\partial_{\mu}\phi^{\alpha})}\Big) = 0.$$ 
(Note that if $\phi^{\alpha} = \phi^{\alpha}(t)$, namely when its just a function of $t$ then these reduce to the ordinary EL equations)
Here $\mu$ takes values $z$ and $\bar{z}$. The first term is zero, whereas the second gives
$$\partial\big(\frac{\partial \mathcal{L}}{\partial({\partial{X^{\mu}}})}\big) + \bar{\partial}\big(\frac{\partial \mathcal{L}}{\partial({\bar{\partial}{X^{\mu}}})}\big) = 0,$$ and as you can see $$\frac{\partial \mathcal{L}}{\partial({\partial{X^{\mu}}})} \propto \bar{\partial} X_{\mu}, \,\,\,\,\,\, \frac{\partial \mathcal{L}}{\partial({\bar{\partial}{X^{\mu}}})} \propto \partial X_{\mu},$$ and since $\partial$ and $\bar{\partial}$ commute, the two terms in the EL equation are equal. The final equation is thus $$\partial\bar{\partial} X_{\mu} = 0$$
A: $$ S=\frac{1}{2\pi\alpha^{\prime}}\displaystyle\int_{R} d^{2}z\hspace{2mm}\partial X^{\mu}\bar{\partial}X_{\mu} $$
To get the e.o.m of $ X^{\mu}(z,\bar z)$ fields,we have to take the variation of action w.r.t $X^{\mu}(z,\bar z)$
$$\delta S=\frac{1}{2\pi\alpha^{\prime}}\displaystyle\int_{R} d^{2}z\hspace{2mm}[(\partial \delta X^{\mu})\bar{\partial}X_{\mu}+\partial X^{\mu}(\bar{\partial}\delta X_{\mu})]\\ \hspace{54mm}=\frac{1}{2\pi\alpha^{\prime}}\displaystyle\int_{R} d^{2}z\hspace{2mm}\Big[
\{\partial(\bar{\partial}X_{\mu}\delta X^{\mu})+\bar\partial(\partial X_{\mu}\delta X^{\mu}) \}-\delta X^{\mu} \partial \bar\partial X_{\mu}  -\delta X^{\mu}\bar\partial\partial X_{\mu}\Big]$$
$$ \hspace{52mm}=\frac{1}{2\pi\alpha^{\prime}}\displaystyle\int_{R} d^{2}z\hspace{2mm}\Big[ \partial(\bar{\partial}X_{\mu}\delta X^{\mu})+\bar\partial(\partial X_{\mu}\delta X^{\mu}) \Big]-\frac{1}{\pi \alpha^{\prime}}\displaystyle\int_{R} d^{2}z\hspace{2mm}\delta X^{\mu} \partial \bar\partial X_{\mu}$$
Now using the divergence theorem in complex coordinates given by eqn(2.1.9) in Polchinski we can write the 1st integral as boundary integral,
$$\hspace{46mm}=\frac{i}{2\pi\alpha^{\prime}}\displaystyle\oint_{\partial R} \Big(\bar{\partial}X_{\mu}\delta X^{\mu}d\bar {z}-\partial X_{\mu}\delta X^{\mu}dz\Big)-\frac{1}{\pi \alpha^{\prime}}\displaystyle\int_{R} d^{2}z\hspace{2mm}\delta X^{\mu} \partial \bar\partial X_{\mu}$$
We can drop the boundary term by choosing the suitable boundary conditions,
$$ \hspace{-25mm}=-\frac{1}{\pi \alpha^{\prime}}\displaystyle\int_{R} d^{2}z\hspace{2mm}\delta X^{\mu} \partial \bar\partial X_{\mu}$$
$$\hspace{-24mm}\delta S=-\frac{1}{\pi \alpha^{\prime}}\displaystyle\int_{R} d^{2}z\hspace{2mm}\delta X_{\mu} \partial \bar\partial X^{\mu}=0$$
which implies,
$$ \partial \bar\partial X^{\mu}(z,\bar z)=0 $$
