I am studying the simplification of polynomial fractions. My textbook has the example of:

: factored out (x+3) from the numerator and denominator

My confusion is over the sense of 'equality' of the 2 expressions. I expected to be able to use either expression interchangeably as the definition for a function. However,

is undefined for x = { 3, -3 }

is undefined for x = { 3 }

The domains of the functions differ. It appears that 'information' was lost in the simplification of the original expression.

Are the 2 expressions not really "equal"? Am I misunderstanding something about the concept of equality with regard to expressions?