Find the magnetic field at the center of a square loop, which carries a steady current I

a) Find the magnetic field at the center of a square loop, which carries a steady current I. Let R be the distance from the center to side.
b) find the field at the center of a regular n-sided polygon, carrying a steady current I. Again, let R be the distance from the center to any side.
c) Check that your formula reduces to the field at the center of a circular loop, in the limit n→∞.