TITLE: Prescribing Gaussian curvature
QUESTION [11 upvotes]: Let $K(r)$ be the piecewise function
                                            

I want to solve the PDE $$\Delta u + K(|x|) e^{2u} = 0$$ for radially symmetric $u$ with boundary condition $u = 0$ at infinity.  I'm content for a solution in two dimensions, so switching to polar coordinates this is the ODE $$\tfrac 1 r u' + u'' + K(r) e^{2u} = 0.$$
The motivation is that the Riemannian metric $g_{ij} = e^{2u} \delta_{ij}$ has curvature profile $K$.  This should be a relatively simple exercise in geometric PDE, and is surely explained in the literature.  Could you please point me toward a reference which explains how to solve this equation explicitly?

REPLY [8 votes]: I'm not sure that this will help, but let me suggest thinking about the following:  You are looking for a metric of the form $g = e^{2u(r)}(dr^2 + r^2\ d\theta^2)$ where $u(r)$ is to be chosen so that the curvature of $g$ is a certain function $K(r)$ and so that $u$ tends to zero as $r\to\infty$.    Now, I wouldn't have called this problem "specifying the curvature profile" just because $r$ won't represent the $g$-distance from the origin when you are done.  Instead, the $g$-distance $s= h(r)$ from the origin will be given by solving $ds = e^{u(r)}\ dr$ with $s(0)=0$, and I would have called $K\bigl(h^{-1}(s)\bigr)$ the 'curvature profile'.
Are you sure that you wouldn't have rather had the metric in the form $g = ds^2 + f(s)^2\ d\theta^2$ where $f(0)=0$ and $f'(0)=1$ and then choose $f$ so that it satisfies the equation 
$$
f''(s) + K(s)\ f(s) = 0
$$
where $K$ is your given function?  
If this is really your problem (and I'm not saying it has to be, but...), then you can, indeed, solve for $f$ explicitly, in a sense, but its definition will be piecewise, of course.  You'll have $f(s) = \sin s$ for $0\le s \le 1$, but on the intervals $1\le s\le 3$ and $3\le s\le 4$, $f$ will be given in terms of translated Airy functions (different ones on the different intervals), and then, for $s\ge 4$, you'll have $f$ be a linear expression in $s$.  Of course, determining the constants at the breakpoints so that $f$ is $C^2$ there is probably not going to be doable in any fully explicit fashion.