I suggest looking into the Newton-Raphson method to extract IV from quoted options prices.
You may also use Nelder-Mead if you consider the dividend yield as an additional unknown.
That said, the dividend yield effect topricing can be removed for European options so Newton-Raphson is sufficient for those.