Since physics usually involves vectors (frequently 3D) with physical dimensions. A quite frequent source of error in physics math is dimensional conflict. It is important to write out notebooks with vector elements defined with Quantity. I’ve been working on a very simple notebook involving position, velocity and acceleration and decided to write a convenience function to help with generating the vectors with associated magnitude variables that can be set, including setting them to functions of time so that I can define the velocity as the time derivative of position and acceleration as time derivative of velocity.
The attached notebook demonstrates the difficulty with this simple notebook.
When we take the derivative of a constant Quantity, the result is a
pure number, not a Quantity:
To the best of my knowledge, ever since Russell’s abandonment of Relation Arithmetic in volume 4 of Mathematica (the original – not the software) the foundation of mathematics does not even try to rigorously accommodate relationally dimensioned quantities. If there is scholarship in mathematics on this topic I would really like to see it because I basically blew my professional capital to hire Tom Etter to solve this problem – critical to the foundation of programming languages (such as Mathematica ironically enough) at the largest DotCom era project: HP’s “Internet Chapter 2”.
That meta-problem aside, the example I provide has an additional “bug” evidenced by the final scalar output which, I would have thought, would be vector.