# A lens with a variable refractive index

A planoconvex lens of radius of curvature $R$ and thickness $d$ (on the optical axis) is made of a material, whose refractive index changes with the distance from the axis according to the following formula: $$n(r) = n_1 + a \cdot r^2$$ where $n_1$ and $a$ are constant. The refractive index outside the lens is $n_0$
Let's consider a ray which is parallel to the optical axis, falling from the flat side. Its distance from the axis is $r_1$. Describe the course of the ray.
The solution claims that the ray will be deviated inside the lens, to the axis if $a>0$ and apart from the axis if $a<0$. But why? The ray is falling perpendicularly, so it's not refracted, and its distance from the axis inside the lens is constant too. So I'd say it should refract only on the other end of the lens, depending on the $n_1,a, n_0$ and $r$