Extending $k$-algebra endomorphism of coordinate ring Let $ k $ be an algebraically closed field. Suppose we have a coordinate ring $ k[x_1, \dots, x_n] $ with $ \{ x_1, \dots, x_d \} $ a transcendental basis and $ k[x_1, \dots, x_n] $ integral over $ k[x_1, \dots, x_d] $. Let $ \varphi $ be a homomorphism $ k[x_1, \dots, x_d] \to k[x_1, \dots, x_d]$ that maps $ x_1 $ to $ x_1 $ and $ x_i $ to $ 0 $ for $ 2 \leq i \leq d $. How do we show that it extends to a homomorphism $ k[x_1, \dots, x_n] \to k[x_1, \dots, x_n]$?
EDIT: the original question is not true as Saucy O'Path pointed out, so I have made it much more specific to what I am interested in.
 A: The claim isn't true, because your $\varphi$ may not have any extension that sends $k[x_1,\cdots,x_n]$ to itself.
For instance, if you are considering the $\Bbb C$-algebra $A=\Bbb C\left[x,y,\sqrt{1-x-y}\right]$, then all maps $\varphi':A\to\overline{\Bbb C(x,y)}$ such that $\left.\varphi'\right\rvert_{\Bbb C[x,y]}=\varphi$ must send $\sqrt{1-x-y}$ to a root of $T^2-1+x$. However, no such root exists in $A$, for if this were the case then there would be two polynomials $p,q\in\Bbb C[x,y]$ such that 
\begin{align}(p+q\sqrt{1-x-y})^2&=1-x\\ p^2+(1-x-y)q^2+2pq\sqrt{1-x-y}&=1-x\\ \left(\frac p{2q}+(1-x-y)\frac q{2p}+\frac{x-1}{2pq}\right)^2&=1-x-y\end{align}
And $1-x-y$ is not a square in $\Bbb C(x,y)$. Same thing for all $k=\overline k$ with $\operatorname{char}k\ne 2$. In characteristic $2$ a similar counterexample can be shown by considering $\sqrt[3]{1-x-y}$ instead of $\sqrt{1-x-y}$.

Before edit: This isn't true. For instance, consider $\Bbb C[x,\sqrt{1-x}]$ and the map $\varphi:\Bbb C[x]\to\Bbb C[x]$, $\varphi(p(x))=p(-x)$. Any map $\varphi':\Bbb C[x,\sqrt{1-x}]\to \overline{\Bbb C(x)}$ such that $\left.\varphi'\right\rvert_{\Bbb C[x]}=\varphi$ must send $\sqrt{1-x}$ to either $\sqrt{1+x}$ or $-\sqrt{1+x}$, neither of which is an element of $\Bbb C[x,\sqrt{1-x}]$.
