# 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?

-

1. You can only make the assignment $\oint \mathbf{B} \cdot dl = 2 \pi d B(d)$ if the situation is radially symmetric.
Regarding the finite case is it possible to get the B-field just at the finite end of a semi-infinite wire which extends to infinity only in one direction? I know I should take the charge accumulation at the finite end into account since it will generate a time-dependent E-field, hence a displacement current. Yet I am unaware of the mathematical details since the field of a point charge(assuming there is a point charge generated at the finite end of the wire) is not defined at the origin $r=0$. We need it in the integral to get the displacement current from the current density. –  Vesnog May 8 at 10:21