Nonlinear mechanisms in encapsulated micromechanical resonators