When the switch is closed, the circuit is a simple DC circuit and the current in the circuit is given by Ohm's law: I=RV=6Ω12V=2A.
When the switch is opened, the current in the circuit drops to zero instantaneously.
However, the magnetic field generated by the current in the coil does not disappear immediately, and it continues to produce a back EMF that opposes the change in current.
This back EMF induces a voltage across the coil that can be calculated using Faraday's law of induction: E=−LΔtΔI, where E is the induced voltage, L is the inductance of the coil, and ΔI/Δt is the rate of change of current in the coil.
In this case, we know that the induced voltage is 20V and the rate of change of current is ΔI/Δt=−2A/(1ms)=−2×103A/s.
Substituting these values into the equation above, we get: 20V=−L×(−2×103A/s).
Solving for L, we get: L=2×103A/s20V=0.01H.
Therefore, the inductance of the coil is 0.01H, or 10 mH.