An engineer, a physicist, and a mathematician are staying in a hotel.
The engineer wakes up and smells smoke. He goes out into the hallway and sees a fire, so he fills a trash can from his room with water and douses the fire. He goes back to bed.
Later, the physicist wakes up and smells smoke. He opens his door and sees a fire in the hallway. He walks down the hall to a fire hose and after calculating the flame velocity, distance, water pressure, and trajectory, he extinguishes the fire with the minimum amount of water and energy needed.
Later, the mathematician wakes up and smells smoke. He goes to the hall, sees the fire and then the fire hose. He thinks for a moment and then exclaims, "Ah, a solution exists!" and then goes back to bed.
In slight contrast to the above joke, here is a post which shows how math can be used in medical or scientific research. As I recall, there are a couple of good examples in Tom Körner's The Pleasures of Counting too. I'm sure there are many other instances.
Math can be thought distinct from science. But it often amazes me that so much of the physical world can be described by math. So much of the physical world seems to be entirely consonant with mathematical concepts and theorems. How is it possible that so much of the physical world can be explained in terms of math? As Richard Feynman once pointed out (paraphrasing), how can math predict what will happen by following rules which have nothing to do with the original phenomenon?
It would doubtless take a considerable amount of space to begin to explore the question since I'd have to better explain what I have in mind when I talk about math and science, define and unpack specific terms, make relevant distinctions within the question, etc. Besides, I'm no philosopher let alone a philosopher of mathematics so I wouldn't have the know-how to do all these things very well at all.
What little I do know about the topic is that there seems to be more than one possible answer to the question.
With regard to possible answers, obviously philosophers or the philosophically-minded can correct me, which I gladly welcome, but as far as I'm aware there are three main schools of thought here: intuitionism, logicism, and formalism.
What's interesting to me though is how Vern Poythress apparently sees an integration between these in the following way (in his Redeeming Science):
God has ordained a coherence among a number of aspects of the world. First, the human mind has intuitions about numbers and space. Second, numerical and spatial order characterize the external physical world. Third, this order has an impressive logical organization, so that many consequences follow from a few starting assumptions. Fourth, the logical order can be organized rigorously into a representation in a formalized language system, with axioms and rules of derivation. The human mind, the physical world, logic, and language cohere. But if someone denies that God is the source of coherence, he is tempted to explain it by reducing the many aspects of the world to one aspect, which is then seen as the ultimate explanation.