Need help with this line integral problem. I've been stuck on this problem for a while any help will be much appreciated.
Problem:
Experiments show that a steady current in a long wire produces a magnetic field B that is tangent to any circle that lies in the plane perpendicular to the wire and whose center is the axis of the wire. Ampère’s Law relates the electric current to its magnetic effects and states that $$\int_c B \,dr=\mu_0 I $$ where $ I $ is the net current that passes through any surface bounded by a closed curve C , and $ \mu_0$ is a constant called the permeability of free space. By taking C to be a circle with radius r , show that the magnitude B of the magnetic field at a distance r from the center of the wire is $$ B = \mu_0 I/2 \pi r $$
Ampere's Law:
$$\oint \vec B \cdot \, d \vec l = \mu_0 I$$
We assume that the magnetic field $\vec B$ is constant, therefore we take it out of the integral:
$$ B \oint d l = \mu_0 I$$ $$ B \cdot (\text{circumference of circle}) = \mu_0 I$$ $$ B \cdot (2 \pi r) = \mu_0 I$$ $$ B = \frac{\mu_0 I}{2 \pi r}$$