# time dependent current/ magnetic field

Is there a general way to calculate the magnetic field for a time dependent current of a long thing wire?

For ex:

If the current is

$$I(t)=I\sin wt,$$ is there a general method to use in order to calculate the magnetic field?

I know for time-independent currents we can use $$\int \vec B\cdot d\vec l=\mu_0 I_{enc}$$ if the symmetry of the system is nice, or we can use Biot-Savart Law for other cases. Thanks...

• You could in principle use Jefimenko's equations, but I imagine that's a bit overkill here. May 21, 2014 at 4:51
• @DavidH Thanks I forgot about that one! Can We use Ampere's law if the symmetry of the system is nice, and and replace $I_{enc}$ by the time dependent current? May 21, 2014 at 4:55
• The Ampere law is not obeyed when changing electric field is present, which is what will almost surely be the case when the current changes. The Biot-Savart law is valid even in such cases if electric field is given by gradient of potential. May 21, 2014 at 4:58
• @JánLalinský Thanks. Thats what I had originally thought. Now you cleared it for me and I understand more. May 21, 2014 at 4:59

You can use the Biot-Savart law, express the magnetic field in terms of current $I$ and then replace $I$ in the formula by $I_0\sin wt$.