Sphere vs Domain
Solution 1:
Domain specifically has the idea of control or power over a certain area. It comes from Latin where it means Lord or Master. A lord or master is certainly an individual that has control over something. This might help you remember the word and how to use it. "Dom" is also used in other words such as domicile and the Russian word for house "Doma." Also in "dominate."
Sphere (definitions 4, 5, and 6 are relevant), on the other hand, doesn't convey the idea of control or power over something, someone, or some place. It is frequently used in expressions such as "sphere of influence" "Political sphere" or "Sphere of friends." Most of the time it conveys the idea of an area of interest or relevance to someone.
It can be argued that "Sphere of influence" and "Domain" are similar, some people possibly feeling that if you exert / have influence you control that area. For example, if I read a sentence "China's sphere of influence extends to the Middle East," (or "China's political sphere extends to the Middle East.") I wouldn't think that the Chinese government rules that area (in the sense of domain), I would just think that Chinese activity is taken more seriously there or that if a Chinese official says "jump" people might ask "how high?" (this is strictly an example and is not intended to express a current political opinion.) Others might disagree saying that Domain and Sphere of Influence are synonymous. I feel they are not. We have the expression "Public Domain" and this specifically means that people have control, whether it is information, a once-copyrighted song, or a building. If a song is in public domain it means that anyone can freely use it without asking permission or paying a royalty fee to the copyright holder.
Further example, I could say that I have several spheres of interest, one of which is Shakespeare study. I don't control the field, and no one in the field gives a hoot about my opinion. On the other hand, for someone like Jonathan Bate or James Shapiro you could say that this is their domain. They do have influence and power. In the world of dental science, as far as I am aware, they have no influence or power so it wouldn't make sense to talk about that as their domain or sphere of influence.
Given that expressions are idiomatic and people use words not really knowing what they mean, you are likely to encounter people using the words in ways that may be confusing or don't make sense when compared to the dictionary definition, or my explanation. I have also seen dictionary definitions define domain as a "sphere of influence." I don't think that's very helpful.
The words are used in different ways in the field of mathematics, so in my opinion it doesn't make sense to say "Yeah but in math we talk about the domain of a function but functions don't rule over the number line."