code in mathematica

Mathematica code