How to calculate the refracted light path when refraction index continuously increasing?

This may (or may not) lead to the same answer as CuriousOne's suggestion above, but the most appropriate (and the longest) way of attempting a solution would to be to employ the Fermat's principle. The method's nicely described in the link, but in a nutshell, you would be led to a condition of the type $$\delta \int n ds = 0$$ where this $ds$ can be cast in terms of your 2D co-ordinates. Now, substitute for the spatial dependence of $n$ and arrive at $$\delta \int n(x,y) \sqrt{(1+(dy/dx)^2)} dx = 0$$

This is a sort of an ab-initio approach. I won't be surprised if there's a shorter method (maybe CuriousOne's suggestion.)