Second and third order nonlinearities in silicon waveguides