Use Ampere's law for steady currents to derive the magnetic field due to a solenoid.
Four very long straight wires are closely bound together to form a small cable.
Currents carried by the wires are : I1 =15A, 12 = -10A, 13 = 20A and 14 = - 5A.
Determine B at a distance of 5 cm from the cable.
In accordance with Ampere's law
2πBr=μ0(I1+I2+I3+I4) respectively
B=0.052⋅10−7(15−10+20−5)=8⋅10−5(T).