@Matt small fix to address Matt E's comment: You should consider $s|_{C_{\delta'} \cup O^c}$ which is continuous since it is continuous on $C_{\delta'}$ and constant zero on $O^c$. Now apply Tietze to obtain $s'$ continuous everywhere and bounded by $\|s\|_\infty$.
@Matt You could, provided you use Tietze in the form: Suppose $s: C \to \mathbb{R}$ is continuous on the compact set $C$ and $O \supset C$ is open. Then there exists a continuous extension $s'$ of $s$ with compact support in $O$. The suggestion I made is a proof of this fact.
@Matt also look at the three times upvoted comment by commenter.
@Matt Did you see the point? You want to achieve two things 1) you want to extend $s$ to a continuous function $s'$ with compact support 2) you want the support to be contained in $O_\delta$ (so that you can control the integral $\int_{O_\delta \smallsetminus C_{\delta'}} |f - s'|$)
@Matt Just to be on the safe side: Choose an open set with compact closure $O_{\delta}' \supset C_{\delta}$ before applying the fix (the $O_{\delta}$ you chose need not have compact closure)
So you have $C_{\delta} \subset O_{\delta}' \subset O_{\delta}$ and $O_{\delta}'$ has compact closure. Then everything works out fine.
Since $C_\delta$ is compact and contained in $O_{\delta}$ and since the space is locally compact: for each $c \in C_\delta$ there is an open set $U_c \ni c$ with compact closure contained in $O_{\delta}$ by local compactness. The $U_c$'s cover $C$. Take a finite sub-cover and put $O_{\delta}' = U_{c_1} \cup \cdots \cup U_{c_n}$. The closure of that set is the compact set $\overline{U_{c_1}} \cup \cdots \cup \overline{U_{c_n}}$.
@tb I inserted the estimate (7) before removing the odd terms. They follow the same estimates as the even terms, so I modified (7), replacing $2k$ by $k$ without using cancellation
@AsafKaragila It is interesting that God is never mentioned as an exponential in the Bible.
@robjohn When the Israelites fought some guys after their escape from the land of Goshen, they only won while Moses held his arms up. If that's not an exponential then I don't know what is exponential.
@tb Have you voted to delete on the "Do algebraists teach analysis sometimes?"
@Matt No :) Here's the really good form (and the one you want to have). Let $X$ be locally compact, let $K \subset X$ be compact and let $f: K \to \mathbb{R}$ be continuous. For every open set $U \supset K$ there exists a continuous function $g: X \to \mathbb{R}$ with $\operatorname{supp}{g} \subset U$ such that $g|_{K} = f$. (tbc)
(continued): to see this, let $h: X \to \mathbb{R}$ be a continuous function with compact support extending $f$ and $\|f\|_{\infty} = \|h\|_\infty$. By Urysohn's lemma there exists a function $k: X \to \mathbb{R}$ with $0 \leq k \leq 1$ and $k|_K = 1$ and $k|_U = 0$ (by the version in your question). Now let $g = hk$. You will have $g|_{K} = h|_{K} k|_{K} = f$ and $\|g\| \leq \|h\| \cdot \|k\| = \|f\|$ and $\operatorname{supp}{g} = \operatorname{supp}{h} \cap \operatorname{supp}{k} \subset U$.
@AsafKaragila There was some discussion about what you mean when you say "your mother" to people. Does it simply mean the vulgar deprecation, or does it have some other meaning?
@JonasTeuwen just normal tasty food. the budget is average 20 pp without drinks
@JonasTeuwen the last time I was to seafood district close to Centraal Station, but non-sea food there was not too tasty. Or maybe I didn't find a good place there
(so you need to do something: your version could create a huge support for the Tietze extension, so you need to cut it down in order to control the integral)
@Matt yes, that's right (and that's not a good hypothesis to have!). That's why you need a bit more massaging... Actually the proof of the version of Tietze you stated should be done in such a way that you get the improved version I gave directly, but from the given tools I don't see a cheaper trick.
Can this problem solve by changing variable formula, i heard the changing of variable formula can work only up to 3 variables- math.stackexchange.com/questions/95120/…
@Matt You didn't. The proof of (the version of Tietze you stated) :). Actually I know only one proof of Tietze and the proof of the result actually shows more than what's stated in your question.
@Matt I don't think it was out of purpose. It's the version you find everywhere when you Google it... the point is a slightly subtle one which you only see when you go through the argument in full detail :)
@tb And that's not included in the "service" because it doesn't matter if students are miserable because (almost) no one there cares. (This rant stops here.)
@Matt Well, even Terry Tao sweeps this point under the rug in his ach so wunderbaren notes that pollute all Google searches. Have a nice evening and don't be too hard on yourself: It's a minor point, really.