For every continuous function $g$ does there exists a sequence of functions ${f_n}$ which converges to $g$?











up vote
1
down vote

favorite
2












Let,
$C(Bbb R):=\
{f:Bbb R to Bbb R| text{ $f$ is continuous and $exists$ a compact set $K$ such that $f(x)=0$, $forall xin K^c$}}.$

Let, $displaystyle g(x)=e^{-x^2}$ for all $xin Bbb R$.
Then prove that there exists a sequence ${f_n}$ in $C(Bbb R)$ such that $f_n to g$ uniformly.



Here $g$ is continuous, so by Weierstress approximation theorem we can say that there always exists a sequence of polynomials ${p_n(x)}$ in $K$ which converges uniformly to $g$ in $K$. But in that case how can I define $f_n(x)$ in such a way that $f_n in C(Bbb R)$ ?










share|cite|improve this question




























    up vote
    1
    down vote

    favorite
    2












    Let,
    $C(Bbb R):=\
    {f:Bbb R to Bbb R| text{ $f$ is continuous and $exists$ a compact set $K$ such that $f(x)=0$, $forall xin K^c$}}.$

    Let, $displaystyle g(x)=e^{-x^2}$ for all $xin Bbb R$.
    Then prove that there exists a sequence ${f_n}$ in $C(Bbb R)$ such that $f_n to g$ uniformly.



    Here $g$ is continuous, so by Weierstress approximation theorem we can say that there always exists a sequence of polynomials ${p_n(x)}$ in $K$ which converges uniformly to $g$ in $K$. But in that case how can I define $f_n(x)$ in such a way that $f_n in C(Bbb R)$ ?










    share|cite|improve this question


























      up vote
      1
      down vote

      favorite
      2









      up vote
      1
      down vote

      favorite
      2






      2





      Let,
      $C(Bbb R):=\
      {f:Bbb R to Bbb R| text{ $f$ is continuous and $exists$ a compact set $K$ such that $f(x)=0$, $forall xin K^c$}}.$

      Let, $displaystyle g(x)=e^{-x^2}$ for all $xin Bbb R$.
      Then prove that there exists a sequence ${f_n}$ in $C(Bbb R)$ such that $f_n to g$ uniformly.



      Here $g$ is continuous, so by Weierstress approximation theorem we can say that there always exists a sequence of polynomials ${p_n(x)}$ in $K$ which converges uniformly to $g$ in $K$. But in that case how can I define $f_n(x)$ in such a way that $f_n in C(Bbb R)$ ?










      share|cite|improve this question















      Let,
      $C(Bbb R):=\
      {f:Bbb R to Bbb R| text{ $f$ is continuous and $exists$ a compact set $K$ such that $f(x)=0$, $forall xin K^c$}}.$

      Let, $displaystyle g(x)=e^{-x^2}$ for all $xin Bbb R$.
      Then prove that there exists a sequence ${f_n}$ in $C(Bbb R)$ such that $f_n to g$ uniformly.



      Here $g$ is continuous, so by Weierstress approximation theorem we can say that there always exists a sequence of polynomials ${p_n(x)}$ in $K$ which converges uniformly to $g$ in $K$. But in that case how can I define $f_n(x)$ in such a way that $f_n in C(Bbb R)$ ?







      real-analysis sequences-and-series analysis sequence-of-function






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Nov 18 at 3:56

























      asked Aug 3 at 3:45









      Empty

      8,04742358




      8,04742358






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote













          Since $g$ tends to $0$ as $xrightarrowinfty$ you can just take $f_n = gphi_n$
          where $phi_n$ is a smooth (for your questions continuous is sufficient) cutoff function such



          $phi_n(x)=1$ on $[-n,n]$, $phi_n(x)=0$ on $(-infty,-n-1]cup[n+1,infty)$, and $0le phi_n(x) le 1$ elsewhere.






          share|cite|improve this answer























          • Your $phi_n$ is not well defined ! In $[-n-1,n+1]$, $phi_n=0$, so how it $=1$ in $[-n,n]$ ?
            – Empty
            Nov 18 at 4:04










          • @Empty thanks for pointing that out, I was obviously not focused when I wrote this. The fix should be obvious though -- fixed it.
            – Thomas
            Nov 18 at 6:44


















          up vote
          0
          down vote













          Let $f_n(x) = begin{cases} g(x), & |x| le n \
          g(n)(n+1-|x|), & n<|x| le n+1 \ 0, & text{otherwise}
          end{cases}$
          (I am using the fact that $g$ is even, but it is clear how this would work for any $g$ that satisfies $g(x) to 0$ as $|x| toinfty$.



          Then $|g-f_n|_infty le sup_{|x| ge n} g(x) = g(n)$, hence the convergence is uniform since $lim_{n to infty} g(x) = 0$.






          share|cite|improve this answer























          • I think $f_n(x)$ is NOT continuous at $x=-n$. $displaystyle lim_{xto (-n)^- }f_n(x)=(2n+1)g(-n)=(2n+1)g(n)$. But, $f_n(-n)=g(-n)=g(n)$.
            – Empty
            Nov 18 at 4:21






          • 2




            Are you looking for answers or looking for flaws? The idea is straightforward. Run with it and figure out the answer yourself, this is not a paid answering service, this is people trying to help you solve well known problems and are spending their free time TRYING TO HELP PEOPLE. $g$ is even for Christ's sake.
            – copper.hat
            Nov 18 at 7:46













          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "69"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2870712%2ffor-every-continuous-function-g-does-there-exists-a-sequence-of-functions-f%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          Since $g$ tends to $0$ as $xrightarrowinfty$ you can just take $f_n = gphi_n$
          where $phi_n$ is a smooth (for your questions continuous is sufficient) cutoff function such



          $phi_n(x)=1$ on $[-n,n]$, $phi_n(x)=0$ on $(-infty,-n-1]cup[n+1,infty)$, and $0le phi_n(x) le 1$ elsewhere.






          share|cite|improve this answer























          • Your $phi_n$ is not well defined ! In $[-n-1,n+1]$, $phi_n=0$, so how it $=1$ in $[-n,n]$ ?
            – Empty
            Nov 18 at 4:04










          • @Empty thanks for pointing that out, I was obviously not focused when I wrote this. The fix should be obvious though -- fixed it.
            – Thomas
            Nov 18 at 6:44















          up vote
          0
          down vote













          Since $g$ tends to $0$ as $xrightarrowinfty$ you can just take $f_n = gphi_n$
          where $phi_n$ is a smooth (for your questions continuous is sufficient) cutoff function such



          $phi_n(x)=1$ on $[-n,n]$, $phi_n(x)=0$ on $(-infty,-n-1]cup[n+1,infty)$, and $0le phi_n(x) le 1$ elsewhere.






          share|cite|improve this answer























          • Your $phi_n$ is not well defined ! In $[-n-1,n+1]$, $phi_n=0$, so how it $=1$ in $[-n,n]$ ?
            – Empty
            Nov 18 at 4:04










          • @Empty thanks for pointing that out, I was obviously not focused when I wrote this. The fix should be obvious though -- fixed it.
            – Thomas
            Nov 18 at 6:44













          up vote
          0
          down vote










          up vote
          0
          down vote









          Since $g$ tends to $0$ as $xrightarrowinfty$ you can just take $f_n = gphi_n$
          where $phi_n$ is a smooth (for your questions continuous is sufficient) cutoff function such



          $phi_n(x)=1$ on $[-n,n]$, $phi_n(x)=0$ on $(-infty,-n-1]cup[n+1,infty)$, and $0le phi_n(x) le 1$ elsewhere.






          share|cite|improve this answer














          Since $g$ tends to $0$ as $xrightarrowinfty$ you can just take $f_n = gphi_n$
          where $phi_n$ is a smooth (for your questions continuous is sufficient) cutoff function such



          $phi_n(x)=1$ on $[-n,n]$, $phi_n(x)=0$ on $(-infty,-n-1]cup[n+1,infty)$, and $0le phi_n(x) le 1$ elsewhere.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Nov 18 at 6:43

























          answered Aug 3 at 4:23









          Thomas

          16.7k21530




          16.7k21530












          • Your $phi_n$ is not well defined ! In $[-n-1,n+1]$, $phi_n=0$, so how it $=1$ in $[-n,n]$ ?
            – Empty
            Nov 18 at 4:04










          • @Empty thanks for pointing that out, I was obviously not focused when I wrote this. The fix should be obvious though -- fixed it.
            – Thomas
            Nov 18 at 6:44


















          • Your $phi_n$ is not well defined ! In $[-n-1,n+1]$, $phi_n=0$, so how it $=1$ in $[-n,n]$ ?
            – Empty
            Nov 18 at 4:04










          • @Empty thanks for pointing that out, I was obviously not focused when I wrote this. The fix should be obvious though -- fixed it.
            – Thomas
            Nov 18 at 6:44
















          Your $phi_n$ is not well defined ! In $[-n-1,n+1]$, $phi_n=0$, so how it $=1$ in $[-n,n]$ ?
          – Empty
          Nov 18 at 4:04




          Your $phi_n$ is not well defined ! In $[-n-1,n+1]$, $phi_n=0$, so how it $=1$ in $[-n,n]$ ?
          – Empty
          Nov 18 at 4:04












          @Empty thanks for pointing that out, I was obviously not focused when I wrote this. The fix should be obvious though -- fixed it.
          – Thomas
          Nov 18 at 6:44




          @Empty thanks for pointing that out, I was obviously not focused when I wrote this. The fix should be obvious though -- fixed it.
          – Thomas
          Nov 18 at 6:44










          up vote
          0
          down vote













          Let $f_n(x) = begin{cases} g(x), & |x| le n \
          g(n)(n+1-|x|), & n<|x| le n+1 \ 0, & text{otherwise}
          end{cases}$
          (I am using the fact that $g$ is even, but it is clear how this would work for any $g$ that satisfies $g(x) to 0$ as $|x| toinfty$.



          Then $|g-f_n|_infty le sup_{|x| ge n} g(x) = g(n)$, hence the convergence is uniform since $lim_{n to infty} g(x) = 0$.






          share|cite|improve this answer























          • I think $f_n(x)$ is NOT continuous at $x=-n$. $displaystyle lim_{xto (-n)^- }f_n(x)=(2n+1)g(-n)=(2n+1)g(n)$. But, $f_n(-n)=g(-n)=g(n)$.
            – Empty
            Nov 18 at 4:21






          • 2




            Are you looking for answers or looking for flaws? The idea is straightforward. Run with it and figure out the answer yourself, this is not a paid answering service, this is people trying to help you solve well known problems and are spending their free time TRYING TO HELP PEOPLE. $g$ is even for Christ's sake.
            – copper.hat
            Nov 18 at 7:46

















          up vote
          0
          down vote













          Let $f_n(x) = begin{cases} g(x), & |x| le n \
          g(n)(n+1-|x|), & n<|x| le n+1 \ 0, & text{otherwise}
          end{cases}$
          (I am using the fact that $g$ is even, but it is clear how this would work for any $g$ that satisfies $g(x) to 0$ as $|x| toinfty$.



          Then $|g-f_n|_infty le sup_{|x| ge n} g(x) = g(n)$, hence the convergence is uniform since $lim_{n to infty} g(x) = 0$.






          share|cite|improve this answer























          • I think $f_n(x)$ is NOT continuous at $x=-n$. $displaystyle lim_{xto (-n)^- }f_n(x)=(2n+1)g(-n)=(2n+1)g(n)$. But, $f_n(-n)=g(-n)=g(n)$.
            – Empty
            Nov 18 at 4:21






          • 2




            Are you looking for answers or looking for flaws? The idea is straightforward. Run with it and figure out the answer yourself, this is not a paid answering service, this is people trying to help you solve well known problems and are spending their free time TRYING TO HELP PEOPLE. $g$ is even for Christ's sake.
            – copper.hat
            Nov 18 at 7:46















          up vote
          0
          down vote










          up vote
          0
          down vote









          Let $f_n(x) = begin{cases} g(x), & |x| le n \
          g(n)(n+1-|x|), & n<|x| le n+1 \ 0, & text{otherwise}
          end{cases}$
          (I am using the fact that $g$ is even, but it is clear how this would work for any $g$ that satisfies $g(x) to 0$ as $|x| toinfty$.



          Then $|g-f_n|_infty le sup_{|x| ge n} g(x) = g(n)$, hence the convergence is uniform since $lim_{n to infty} g(x) = 0$.






          share|cite|improve this answer














          Let $f_n(x) = begin{cases} g(x), & |x| le n \
          g(n)(n+1-|x|), & n<|x| le n+1 \ 0, & text{otherwise}
          end{cases}$
          (I am using the fact that $g$ is even, but it is clear how this would work for any $g$ that satisfies $g(x) to 0$ as $|x| toinfty$.



          Then $|g-f_n|_infty le sup_{|x| ge n} g(x) = g(n)$, hence the convergence is uniform since $lim_{n to infty} g(x) = 0$.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Nov 18 at 7:43

























          answered Aug 3 at 4:23









          copper.hat

          125k558158




          125k558158












          • I think $f_n(x)$ is NOT continuous at $x=-n$. $displaystyle lim_{xto (-n)^- }f_n(x)=(2n+1)g(-n)=(2n+1)g(n)$. But, $f_n(-n)=g(-n)=g(n)$.
            – Empty
            Nov 18 at 4:21






          • 2




            Are you looking for answers or looking for flaws? The idea is straightforward. Run with it and figure out the answer yourself, this is not a paid answering service, this is people trying to help you solve well known problems and are spending their free time TRYING TO HELP PEOPLE. $g$ is even for Christ's sake.
            – copper.hat
            Nov 18 at 7:46




















          • I think $f_n(x)$ is NOT continuous at $x=-n$. $displaystyle lim_{xto (-n)^- }f_n(x)=(2n+1)g(-n)=(2n+1)g(n)$. But, $f_n(-n)=g(-n)=g(n)$.
            – Empty
            Nov 18 at 4:21






          • 2




            Are you looking for answers or looking for flaws? The idea is straightforward. Run with it and figure out the answer yourself, this is not a paid answering service, this is people trying to help you solve well known problems and are spending their free time TRYING TO HELP PEOPLE. $g$ is even for Christ's sake.
            – copper.hat
            Nov 18 at 7:46


















          I think $f_n(x)$ is NOT continuous at $x=-n$. $displaystyle lim_{xto (-n)^- }f_n(x)=(2n+1)g(-n)=(2n+1)g(n)$. But, $f_n(-n)=g(-n)=g(n)$.
          – Empty
          Nov 18 at 4:21




          I think $f_n(x)$ is NOT continuous at $x=-n$. $displaystyle lim_{xto (-n)^- }f_n(x)=(2n+1)g(-n)=(2n+1)g(n)$. But, $f_n(-n)=g(-n)=g(n)$.
          – Empty
          Nov 18 at 4:21




          2




          2




          Are you looking for answers or looking for flaws? The idea is straightforward. Run with it and figure out the answer yourself, this is not a paid answering service, this is people trying to help you solve well known problems and are spending their free time TRYING TO HELP PEOPLE. $g$ is even for Christ's sake.
          – copper.hat
          Nov 18 at 7:46






          Are you looking for answers or looking for flaws? The idea is straightforward. Run with it and figure out the answer yourself, this is not a paid answering service, this is people trying to help you solve well known problems and are spending their free time TRYING TO HELP PEOPLE. $g$ is even for Christ's sake.
          – copper.hat
          Nov 18 at 7:46




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematics Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2870712%2ffor-every-continuous-function-g-does-there-exists-a-sequence-of-functions-f%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Aardman Animations

          Are they similar matrix

          “minimization” problem in Euclidean space related to orthonormal basis