I am having an issue numerically solving the following diffusion equation with state-dependent diffusion coefficient and need some help finding out what to do. The equation I wish to solve is:
$$ \frac{\partial u}{\partial t} = \frac{\partial}{\partial x} \left( D(x) \frac{\partial u}{\partial x} \right) $$
where $ D(x) $ is some sigmoidal function.
I am struggling to solve the equation analytically but am trying to use the Crank-Nicholson finite difference method to implement it numerically. Can anybody provide some insight into analytical/numerical techniques available to solve this equation?