Hello! I'm wondering if there's a general dependency/connection/correlation/function for changes in distance between an electromagnet (coil with iron core) and a magnet (Samarium Cobalt). Here's a picture to explain what I mean: If I move the coil closer to the magnet (smaller x) the force on the magnet increases and vice versa. I've discovered that it's not a linear connection. I've tried searching and the closest answer I've found is a function like f(x)=1/x^3 or f(x)=1/x^2 which I belive is called the inverese square law. However, in this case there are two magnetic fields involved so maybe it's not possible to determine such function for the above case? Any ideas?