# Using Ampere's circuital law for an infinitely long wire & wire of given length

According to Ampere's Ciruital Law:

Now consider two straight wires, each carrying current I, one of infinite length and another of finite length l. If you need to find out magnetic field because of each, at a point (X) whose perpendicular distance from wire is d.

You get magnetic field as $\frac{\mu I}{2 \pi d}$. Same for both.

But,

Magnetic field due to infinitely long wire is : $\frac{\mu I}{2 \pi d}$

Magnetic field due to wire of finite length l : $\frac{\mu I (\sin(P)+\sin(Q)) }{2 \pi d}$, where P & Q are the angles subtended at the point by the ends of the wire.

Why are we getting wrong value for using Ampere's circuit law?

-
I try to check back on things like this, but to insure attention you can flag the post for the moderators. –  dmckee Aug 31 '11 at 16:34

1. You can only make the assignment $\oint \mathbf{B} \cdot dl = 2 \pi d B(d)$ if the situation is radially symmetric.