Equations for particle filter
why do we need the particle filter? 


When your model is non-linear there is no analytical solution to obtain the PDF of the state. The Kalman filter/smoother can't be applied in the sense that it is not optimal. The particle filter is one method to obtain an estimate of state PDF in a sequential setup.


  can't we just do ML estimation


Dependent on the model you may find that even an ML estimator can't be found without going through some approximations. But the particle filter is also used in a Bayesian contexts where other estimators are relevant.