Let $\ U = \big\{ \ [x:y]\in\mathbb{P}^1 \big|\ x\neq0\big\}$ and $f:U\rightarrow \mathbb{A}^1$ be the map
$$f([x:y])=\frac{y}{x}$$
Show this is a morphism $U\rightarrow \mathbb{A}^1$ and that it can't be extended to a map $\ \ \mathbb{P}^1 \rightarrow \mathbb{A}^1$.
My attempt was was to show $U$ is dense in $\mathbb{P}^1$ and use that to get a contradiction. I also proved $U$ is isomorphic to $\mathbb{A}^1$ but I dont think its much helpful.
Thank you in advance