indeterminate forms and different domains

I was hoping that someone could help me understand why an expression like

$\frac{(x+19)}{(3+x)}$

has a domain that is undefined only at x = -3, but when multiplying the expression by $\frac{(x-3)}{(x-3)}$ or essentially multiplying the fraction by 1, it becomes

$\frac{(x+19)(x-3)}{(3+x)(x-3)}$

and has the new domain that is undefined at x = -3 and x = 3. How can multiplying a function by 1 make it undefined at a new spot? How can something that seems like it's the same function have a different domain?

Am I messing something up? Am i missing something? I think it has something to do with indeterminate forms but after spending some time on wikipedia and searching elsewhere I still can't quite logic through it. Thanks.

• Simple: you don't multiply it by $1$. You multiply it by an expression which is equal to $1$, except at $x=3$, where it is undefined. – Bernard Jun 15 '18 at 21:26
• @Bernard Ah. so would this mean if we are simplifying the second expression to look like the first by cancelling (x-3)/(x-3) we essentially have a new function since it now has different domain restrictions even though the graph looks much the same? – Mike Jun 15 '18 at 23:31
• It's exactly that. Afunction is not only determined by its formula (or formulæ) but also by its domain and its codomain. – Bernard Jun 15 '18 at 23:40
• @Bernard Ah okay thank you for the help. – Mike Jun 15 '18 at 23:51

As already suggested @Bernard, when you multiply for that ratio, you have to assume that $x\neq3$, or you could multiply for $0/0$, that is not possible.