Philosophy comes up when science is in-adequate. They are just part of the same circle. Humans have been observing and explaining various natural phenomena due to their 'intellect'. They see patterns that repeat and use that in their daily life. Probably everything was philosophical at the start. As the human capabilities improved, things that get defined, measured and predicted very well, pass onto the realm of science. The rest is termed philosophy. As the light of knowledge (various types of jnAna) illuminates the circle more and more, the definition, measurement, predictability becomes more and more, and those parts pass into realm of science (vi-jnAna - that we certainly know) from philosophy (saMjnana, sajjnana etc - the whole or true knowledge). As vaidika maarg got interpreted into a life of pure rituals, siddhartha started questioning it and came up with shunya tattva, saying there's nothing (shunya) beyond this life and human life is result of our own karma. With