Why do we take the domain of $f(x)/g(x)$ as $\mathbb{R} - \{0\}$ rather than $\mathbb{R}$ when $f(x) = x$ and $g(x) = 1/x$? Let $f(x)=x$ and $g(x)=\frac{1}{x}$, Domain$(f)=\mathbb{R}$ and Domain$(g)= \mathbb{R}-\{0\}$. We have to find the domain of $\frac{f(x)}{g(x)}$.
When we solve this expression, as the $x$ of $g(x)$ would go to the numerator, we would get the final term as $x^2$. As $x^2$ is defined for all $\mathbb{R}$, the domain should be $\mathbb{R}$ for $\frac{f(x)}{g(x)}$. Then why do we take the domain as $\mathbb{R}-\{0\}$ instead of $\mathbb{R}$?
 A: It's because you have to use $g(x)$ to actually get $\dfrac{f(x)}{g(x)}$.  If you were just given the function $x^2$ from the start, then yes, the domain would be $\mathbb{R}$.  But since you have to actually go through the process of dividing $x$ by $1/x$ to get $x^2$, then you must make sure that both $x$ and $1/x$ are defined.  Well, $x$ is defined everywhere, but $1/x$ is not defined at $x=0$.  Therefore $x=0$ is not in the domain.
Similar issues arise when solving certain types of equations (for example, logarithmic equations).  Solutions must be checked and extraneous solutions must be discarded.
A: Good question. There are times when you might want all of $\mathbb{R}$ for the domain, but sometimes not. The answer depends on the context - in particular, whether you may simplify algebraically first.
If you were writing a computer program to compute $f/g$ by finding values for the numerator and denominator and then dividing then $0$ would not be in the domain. 
This situation isn't just a software construction problem. There are abstract mathematical structures where the rules say "don't simplify".
A: $f/g=x^2$ only if x is not 0.  Your algebra assumes this to be the case.
A: since the domain of $$g(x)=\frac{1}{x}$$ are all real $x$ without zero,thus the quotient of $$f$$ and $$g$$ has the same domain 
