Let $X$ be a topological space, $Y\subseteq X$ closed and $U:=X\backslash Y$. Then $I_Y:=\{f \in C_o(X)\mid f_{| Y}=0\} \subseteq C_0(X)$ is a closed Ideal. I want to show that $I_Y \cong C_0(U)$. I'm thinking that the isomorphism should be $$\Phi: I_Y \rightarrow C_0(U), f\mapsto f_{|U}.$$
Now if I want to show that $\Phi$ is surjective, I have to show that for every $f \in C_0(U)$
$$f{'}(x):= \begin{cases} f(x) &\text{if } x \in U \\ 0 & \text{if } x \in Y. \end{cases} $$ $f{'} \in C_0(X)$. But I am not sure that's right, at least I do not think it's working.
thank you
I will assume that $X$ is locally compact, because otherwise it is hard to determine what "vanishing at infinity" could mean.
As you say, define $$ g(x)=\begin{cases}f(x),&\ x\in U\\ 0,&\ x\in Y\end{cases} $$ First you need to argue that $g$ is continuous. This is where you use that $U$ is open and that $g\in C_0(U)$. If $x\in U$, then you can test continuity on neighbourhoods of $x$ that lie entirely inside $U$, so $g$ is continuous on $U$. If $x\in Y$ is in the interior of $Y$, then $g=0$ on a neighbourhood of $x$. And if $x$ is in the boundary of $Y$, then there is a net $\{u_j\}\subset U$ such that $u_j\to x$.
Claim: $f(u_j)\to0$. This shows that $g$ is continuous, it is in $C_0(X)$ (because it is in $C_0(U)$ and it is zero on $U^c=Y$), and so $g\in I_Y$.
Proof of the claim. Suppose that $f(u_j)$ does not converge to zero. Then we may assume that $|f(u_j)|>\varepsilon$ for some fixed $\varepsilon$ and all $j$ (after replacing by a subnet if necessary). If $K\subset U$ is any compact, it cannot contain all of $\{u_j\}$, because if it did then $x\in K\subset U$ and $U$ would not be open. Thus $\sup_{y\in K}|f(y)|\geq\varepsilon$. This contradicts the fact that $f\in C_0(U)$.