Algebra: Is $f(x) = \frac x x$ the same as $f(x) = 1$? My question is basically: can we simplify $f(x) = \frac x x$ to $f(x) = 1$ without considering $f(0)$?
Second, if they are not the same thing how can we simplify equations like $x + 2xy = 5x$ to $1 + 2y = 5$ by dividing both sides by $x$ if the value of $x$ could be $0$. In other words: are unknowns in algebraic equations different from function variables?
And finally, the only solution to $x = 2x$ must be $0$ otherwise, $1 = 2$ so we can't divide both sides by $0$ in this case. Is this related to the proof in those YouTube videos titled "Stump your math teacher. Proof of $1=2$"?
 A: In all cases we cannot divide by $x$ if there is a possibility that $x=0$. The equations must be solved by factorisation and considering that $x=0$ could be a valid solution. For the function $f(x)=\frac{x}x$, this is equal to $1$ only where $x\ne0$ so for example we can say that
$$f(x)=\frac{x}x=1\text{ for all } x\in\mathbb{R^+}$$
but
$$f(x)=\frac{x}x\ne1\text{ for all } x\in\mathbb{R}$$
A: If $f$ is defined as $f(x)={x\over x}$ then $f$ is undefined at $x=0.$  It would be correct to say $f(x)=1,\ x\neq0.$  As for simplifying the equation, there are two cases, either $x=0$ and any value of $y$ gives a solution, or $x\neq0$ and $y$ satisfies $1+2y=5.$
Whenever you want to divide by some algebraic expression, you must either check that it can't be $0$, or consider the case where it does evaluate to $0$ separately. There are no circumstances under which you can divide by $0.$
I don't know the video, but lots of false proofs are based on dividing by $0$.  There are no circumstances in which you can divide by $0.$
A: The issue of $\frac{x}{x}$ and $1$ being differnt functions because they have different domains has been adequately addressed in other answers.
There are basically two ways to attack $x+2xy=5x$.  The first is the method you have been taught: bring everything to one side of the equal sign and factor:
\begin{align*}
x + 2 x y - 5 x &= 0  \\
2 x y - 4 x &= 0  \\
2x( y - 2) &= 0
\end{align*}
For the product of two numbers to be zero, one or both are zero, so either $x=0$ or $y = 2$ (or both).
Alternatively, one may track the possibility that you have inadvertently divided by zero in parallel:
\begin{align*}
x + 2 x y &= 5 x  \\
1 + 2 y &= 5 &\text{ or } x &= 0  \\
y &= 2 &\text{ or } x &= 0
\end{align*}
You get the same result either way since the logical/mathematical usage of the word "or" means "either or both".
A: You need to consider two cases. If $x \ne 0$, then $\dfrac 1x$ exists and you can divide both sides by $x$, which is equivalent to multiplying both sides by $\dfrac 1x$.
\begin{align}
   x + 2xy &= 5x \\
   \dfrac{x + 2xy}{x} &= \dfrac{5x}{x} \\
   1+2y &= 5 \\
   y &= 2
\end{align}
If $x=0$, then you note that $x+2xy = 5x = 0$. Regardless of the value of $y$. 
Your solution would therefore be
$$ y = \begin{cases}
   2 & \text{If $x \ne 0$} \\
   \text{Any real number} & \text{If $x=0$}
\end{cases}
$$
