In essence, your question is like this SE post which asks "how science is related to philosophy". Other closely related question are "is science just a more refined and effective method of philosophy?", "how does one know whether a discipline is a science of philosophy?", and "How should we characterize the relationship between mathematics and philosophy of mathematics?"
If by tree, you mean that math and sciences are types of philosophy, a consensus would be no. A fork and a spoon are two tools for two different tasks. But, to extend the metaphor, a spoon could be shaped into a fork of sorts in the same way that questions that appear in science often mature to the point they become sciences in their own right. In fact, physics which is often considered a model for other sciences (rightly or wrongly), was originally a branch of philosophy; math, physics, and philosophical theory all have different aims, but they are all practices and theories.
To understand why that is, one has to ask questions like "what is philosophy" (which is metaphilosophy), "what is science" (which is philosophy of science), and "what is mathematics" (which is philosophy of mathematics). These involve the general question of definition, the process which is highly philosophical in nature.
Some philosophers, such as W.V.O Quine, believe that how we come to knowledge (which is called epistemology) should largely be just science itself. This is called a naturalized epistemology, and these philosophers theorize that knowledge is on a continuum where the theories of philosophy and the theories of science are very closely related. Other philosophers reject this forcefully. The relationship between mathematics, logic, and philosophy is also a topic of great interest. This problem is known as the foundations of mathematics. See "Where is the border between philosophy and mathematics?".
It should be noted that definitions are notorious in philosophy for being problematic and go back to ancient Greece where philosophers like Plato argued incessantly and stubbornly about definitions. From the article:
When Plato defined a human being as a bi-ped without feathers, Diogenes is said to have plucked a chicken and presented it in Plato's classroom, crying, "Behold, Plato's human being." Plato allegedly replied that his definition would now need to be revised, but this concession to a critic seems to have been an exception rather than the rule.
This question will certainly generate controversial answers because words like 'philosophy', 'science', and 'mathematics' are themselves contentiously defined. For instance, while most people seem to presume there is one thing called science, philosophers of science generally disagree and believe the problem may be unresolvable. This is known as the demarcation problem of science.
Your question, however, is a challenging one, because non-philosophers often are educated very lightly on what science, math, and philosophy are. In my state in the US, for instance, math educators aren't even required to be math majors (which is typical in the US). The best way to come to an answer is to study all three!