1. The problem statement, all variables and given/known data I have a rectangular coil with lenght L and the cross-section's sides has lenght a and b (b>a). A wire is tightly wrapped around N times. Calculate the magnetic field inside the coil. 2. Relevant equations The problem I have is that in class we were taught how to calculate the magnetic field for a solenoid were the diameter is much smaller than the lenght of the soleind, making the magnetic field inside almost constant. We used Ampere's law. Since I now have a rectangular coil I'm confused. 3. The attempt at a solution If I were to use the same approach as for a solenoid I would draw a rectangular path parallell to the magnetic field inside the coil. I would traverse the path counterclockwise and everytime I wire passes through my rectangular loop I would add the magnetic field times the lenght of the side parallell to the magnetic field. If I then would go on the result would be the same as for the solenoid, that can't be right? But then again, if I divide every loop of the wire around the coil in to indivdiual cases and then add up all the N loops. Then I could safely assume that the magnetic field is constant right!? And if I proceeded with making a rectangular path and calcualte the magnetic field using Ampere's law. Wouldn't I just end up with the same result as for the soleind? But then why were the professor implying so strongly that the solenoid had to have a small diameter. Aswell dose the lenght of the sides, a and be, truly not contribute? I would highly appreciate any nod in the right direction for solving this!