Why magic and physics cannot coexist peacefully? After reading many physics and math stuff, I think that the problem maybe come from the principle of least action. So, I edited the definition of action, in order to make magic and physics coexist peacefully.
https://en.wikipedia.org/wiki/Principle_of_least_action
Definition of action in my world: $$ S=\int_{t_1}^{t_2} L(\mathbf{q,\dot{q},t})\;dt + \frac{\int_{t_1}^{t_2} M(\mathbf{r-q,\dot{r}-\dot{q},t})\;dt}{1+|\int_{t_1}^{t_2} L(\mathbf{q,\dot{q},t})\;dt|} $$ The first term is the definition of action in real world. The second term is added by me. $$ \int_{t_1}^{t_2} M(\mathbf{r-q,\dot{r}-\dot{q},t})\;dt $$ It is the total magical power needed to change a body's trajectory.
r is the new position. (after magic influence)
r dot is the new velocity. (after magic influence) $$ 1+|\int_{t_1}^{t_2} L(\mathbf{q,\dot{q},t})\;dt| $$ is used to suppress the influence of magic in daily lives.
"1+" is used to prevent value which is smaller than one and bigger than zero to appear in the denominator.
Absolute value is used to prevent negative value.
Finally, the magical power need to have a unit $ J^2 s$ as well. lol
Is there any contradiction (physics or math) caused by this edited definition of action? (I know that many equations will change, such as F=ma, but it is ok if there is no contradiction.)
Response to Comments:
I didn't plan to define "magical power" using some well-known physics concept, such as energy. I want to make "magical power" into something new, so its unit $ J^2 s$ is the only explanation. :p
Magic in my world also affects quantum, but the calculation of quantum field theory is difficult, I need to spend more time on it.