Some time ago I posted this question but I reckon it was too vague. Nontheless, I've been working on it and I've come up with some interesting conclusions. My question is: can light be subject to an acceleration (defined as a change of the velocity's modulus with time) by going through an inhomogeneous transparent medium? Its speed would be given by: $v=\frac{c}{n(x)}$ and therefore the corresponding acceleration would be:
$$a = \frac{dv}{dt}=-\frac{c}{n^2(x)}\frac{dn}{dx}\frac{dx}{dt}$$
Where the last term is the speed of light in the material again, and therefore:
$$\boxed{a = -\frac{c^2}{n^3(x)}\frac{dn}{dx}}$$
Naturally, light's acceleration would be proportional to the opposite of the change of the material's refractive index with space. Interestingly enough, the acceleration also depends strongly on the medium's refractive index, as well as on the square of the speed of light in vacuum, which would yield a considerable acceleration.
Is it correct to talk about the acceleration of light in material media? Technically, photons are not being accelerated, it's just a domino effect where the domino chips fall with varying rates.