The legal profession has at best an inaccurate and non-uniform concept of what math is. Relying on what the legal profession views as math therefore is not a valid argument and depends on which part of the legal profession you survey.
If software by itself can be a patentable device/machine for the purposes of patent law, that needs to be made explicit, and I happen to think it will cause serious problems; it already is causing major problems, even without explicit supporting precedent.
Almost every software patent you can find mentions network communications, memory storage, disk storage, display, or other artifacts of general purpose computing. If software by itself is, or should be, patentable, why is everyone trying so hard to patent complete machines rather than only software algorithms? Maybe it's that they don't agree with you that pure software implementations of solutions to real world problems are patentable?
According to your paradigm of allowing patents for application of math to a practical problem, you're fine with someone patenting a moon slingshot maneuver to get back to Earth? That's an application of pure math.
We agree you can't patent using equations to predict motion, right?
Can you patent using equations to predict motion and reversing that to generate a solution to a specific orbital problem?
Can you patent running that algorithm on a general purpose computing machine?
Can you patent an embedded platform that is built out of a general purpose computing machine, but is sold as a black box running only that algorithm with suitable inputs and outputs?