here is the quote from my work on the subject. I think you are looking for a simple calculus derivative; maybe I will have that for you soon once I take a closer look at this problem. Can you restate your problem in a scientific manner, Introduction, Hypothesis, and Alternative Hypothesis?
The force of electromagnetism is based on the speed of light.
The concepts involve similar Unified approaches as we have taken in Gravity where we dismiss the possibility of the magnet or planet causing it’s own field and rely more on what other energy exists in outer-space. The reason for this is that as you will see once we get down to the nuclear forces it is hard to imagine an object so small yet having the ability to create it’s own force particles which have the ability to escape to make a return journey which would cause attraction for any object in that return path.
Electromagnets use fields but also operate at the speed of
light; there are energy disturbances in magnets that cause the photons to bend space and "push" some objects away while bringing others closer due to the complex interaction between the gravitational forces proportioned to the electromagnetic forces.
Picture a bar magnet with positive and negative. Plus and
minus are sides used to determine which side will attract and which will repel. However they are both gravitationally similar but act totally different in the presence of one another. The process is simple, the negative side of the magnet conducts energy from space, and the positive side repels it.
It is the Universal-shape of the magnet that makes it
possible for photons to cause the negative side and the positive to have the same mass and different force vectors.
A similar concept of photons pushing objects instead of
magnetic fields pulling objects. So magnets may actually be pushed together by space rather than pull themselves that way. This magnet I keep talking about is the result of photons that act as gravitational force particles called gravitons. Gravitons need to be present in order for things to work. Magnets are conductors for gravitons.