A curved lagrangian in terms of a flat one
Let us consider the following gravitational background:
and the Polyakov lagrangian in conformal gauge with Euclidean Lorentzian signature:
The Euler-Lagrange equations can be found to be:
and
We look at this and think how can we make these equations simpler. The first equation can be solved with:
This is a “T-duality” transformation. For the second equation we see that if then we get
with the flat-space Polyakov lagrangian in terms of the new coordinates
:
We can integrate this equation to find an expression for in terms of the solutions of the equations of motion and the flat-space lagrangian:
Then, pluging this back into the classical action we get
Finally we can write
so we can write the expression in the exponential as a sum of integrals over the worldsheet coordinates.
On the other hand, if instead we have then we can write:
with
The lagrangian can be writen as
We have found an expression for the classical lagragian in some (not-so) arbitrary gravitational background in terms of the coordinates and the flat-space lagrangian. The problem is we do not get any information about the solution for the equations of motion.

This is true when the worldsheet is Lorentzian.
For an Euclidean worldsheet the factors in the lagrangian get a relative minus sign and the action gets an overall factor of
.