Continuous function of class $C^2$ that consists of cases $0$ if $xgeq 0$, positive if $x<0$

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












question



I am trying to understand the concept of continuity better and for that I wonder, if the following function



$$
f(x) =
begincases
0 &textif x geq 0\
x^2 &textif x < 0
endcases
$$



continuous and its derivatives continuous in two levels or more such that it is a function of class $C^2$?



context



Someone reasoned that $f(x^2)=0 Rightarrow f(t)=0$ to eliminate a term in an expression, but it seems to me that it isn't necessarily true if $t < 0$ because of cases like the function I am asking about. The function has to be of class $C^2$, however, so the function $f$ might not be contradicting the reasoning if $f$ isn't of class $C^2$.







share|cite|improve this question


























    up vote
    0
    down vote

    favorite












    question



    I am trying to understand the concept of continuity better and for that I wonder, if the following function



    $$
    f(x) =
    begincases
    0 &textif x geq 0\
    x^2 &textif x < 0
    endcases
    $$



    continuous and its derivatives continuous in two levels or more such that it is a function of class $C^2$?



    context



    Someone reasoned that $f(x^2)=0 Rightarrow f(t)=0$ to eliminate a term in an expression, but it seems to me that it isn't necessarily true if $t < 0$ because of cases like the function I am asking about. The function has to be of class $C^2$, however, so the function $f$ might not be contradicting the reasoning if $f$ isn't of class $C^2$.







    share|cite|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      question



      I am trying to understand the concept of continuity better and for that I wonder, if the following function



      $$
      f(x) =
      begincases
      0 &textif x geq 0\
      x^2 &textif x < 0
      endcases
      $$



      continuous and its derivatives continuous in two levels or more such that it is a function of class $C^2$?



      context



      Someone reasoned that $f(x^2)=0 Rightarrow f(t)=0$ to eliminate a term in an expression, but it seems to me that it isn't necessarily true if $t < 0$ because of cases like the function I am asking about. The function has to be of class $C^2$, however, so the function $f$ might not be contradicting the reasoning if $f$ isn't of class $C^2$.







      share|cite|improve this question














      question



      I am trying to understand the concept of continuity better and for that I wonder, if the following function



      $$
      f(x) =
      begincases
      0 &textif x geq 0\
      x^2 &textif x < 0
      endcases
      $$



      continuous and its derivatives continuous in two levels or more such that it is a function of class $C^2$?



      context



      Someone reasoned that $f(x^2)=0 Rightarrow f(t)=0$ to eliminate a term in an expression, but it seems to me that it isn't necessarily true if $t < 0$ because of cases like the function I am asking about. The function has to be of class $C^2$, however, so the function $f$ might not be contradicting the reasoning if $f$ isn't of class $C^2$.









      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Aug 20 at 13:11

























      asked Aug 20 at 13:05









      dekuShrub

      1609




      1609




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          It's certainly continuously differentiable (i.e. $C^1$), but it isn't $C^2$. To see this first compute the derivative. For $x_0 > 0$, the function is constant around $x_0$, and hence has a derivative of $0$. For $x_0 < 0$, the function is equal to $x^2$ around $x_0$, so the derivative is $2x_0$. The only case left to check is $x = 0$.



          We have
          beginalign*
          f'(0) &= lim_h to 0 fracf(h) - f(0)h = lim_h to 0 fracf(h)h \
          &= lim_hto 0 begincases 0 & textif h ge 0 \ h & textif h < 0 endcases.
          endalign*
          Thus clearly we have $lim_hto 0^+ fracf(h)h = lim_hto 0^- fracf(h)h = 0$, so $f'(0) = 0$. Hence,
          $$f'(x) = begincases 0 & textif x ge 0 \ 2x & textif x < 0 endcases.$$
          Such a function could only be discontinuous at $0$, but the left and right limits both agree with the function value, so it's continuous.



          It is not, however, differentiable at $0$. Note that
          beginalign*
          f''(0) &= lim_h to 0 fracf'(h) - f'(0)h = lim_h to 0 fracf'(h)h \
          &= lim_hto 0 begincases 0 & textif h ge 0 \ 2 & textif h < 0 endcases.
          endalign*
          Clearly, in this case, the left and right limits are $2$ and $0$ respectively. Hence the limit (and the second derivative at $0$) doesn't exist.






          share|cite|improve this answer




















            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: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            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%2f2888766%2fcontinuous-function-of-class-c2-that-consists-of-cases-0-if-x-geq-0-posi%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote



            accepted










            It's certainly continuously differentiable (i.e. $C^1$), but it isn't $C^2$. To see this first compute the derivative. For $x_0 > 0$, the function is constant around $x_0$, and hence has a derivative of $0$. For $x_0 < 0$, the function is equal to $x^2$ around $x_0$, so the derivative is $2x_0$. The only case left to check is $x = 0$.



            We have
            beginalign*
            f'(0) &= lim_h to 0 fracf(h) - f(0)h = lim_h to 0 fracf(h)h \
            &= lim_hto 0 begincases 0 & textif h ge 0 \ h & textif h < 0 endcases.
            endalign*
            Thus clearly we have $lim_hto 0^+ fracf(h)h = lim_hto 0^- fracf(h)h = 0$, so $f'(0) = 0$. Hence,
            $$f'(x) = begincases 0 & textif x ge 0 \ 2x & textif x < 0 endcases.$$
            Such a function could only be discontinuous at $0$, but the left and right limits both agree with the function value, so it's continuous.



            It is not, however, differentiable at $0$. Note that
            beginalign*
            f''(0) &= lim_h to 0 fracf'(h) - f'(0)h = lim_h to 0 fracf'(h)h \
            &= lim_hto 0 begincases 0 & textif h ge 0 \ 2 & textif h < 0 endcases.
            endalign*
            Clearly, in this case, the left and right limits are $2$ and $0$ respectively. Hence the limit (and the second derivative at $0$) doesn't exist.






            share|cite|improve this answer
























              up vote
              2
              down vote



              accepted










              It's certainly continuously differentiable (i.e. $C^1$), but it isn't $C^2$. To see this first compute the derivative. For $x_0 > 0$, the function is constant around $x_0$, and hence has a derivative of $0$. For $x_0 < 0$, the function is equal to $x^2$ around $x_0$, so the derivative is $2x_0$. The only case left to check is $x = 0$.



              We have
              beginalign*
              f'(0) &= lim_h to 0 fracf(h) - f(0)h = lim_h to 0 fracf(h)h \
              &= lim_hto 0 begincases 0 & textif h ge 0 \ h & textif h < 0 endcases.
              endalign*
              Thus clearly we have $lim_hto 0^+ fracf(h)h = lim_hto 0^- fracf(h)h = 0$, so $f'(0) = 0$. Hence,
              $$f'(x) = begincases 0 & textif x ge 0 \ 2x & textif x < 0 endcases.$$
              Such a function could only be discontinuous at $0$, but the left and right limits both agree with the function value, so it's continuous.



              It is not, however, differentiable at $0$. Note that
              beginalign*
              f''(0) &= lim_h to 0 fracf'(h) - f'(0)h = lim_h to 0 fracf'(h)h \
              &= lim_hto 0 begincases 0 & textif h ge 0 \ 2 & textif h < 0 endcases.
              endalign*
              Clearly, in this case, the left and right limits are $2$ and $0$ respectively. Hence the limit (and the second derivative at $0$) doesn't exist.






              share|cite|improve this answer






















                up vote
                2
                down vote



                accepted







                up vote
                2
                down vote



                accepted






                It's certainly continuously differentiable (i.e. $C^1$), but it isn't $C^2$. To see this first compute the derivative. For $x_0 > 0$, the function is constant around $x_0$, and hence has a derivative of $0$. For $x_0 < 0$, the function is equal to $x^2$ around $x_0$, so the derivative is $2x_0$. The only case left to check is $x = 0$.



                We have
                beginalign*
                f'(0) &= lim_h to 0 fracf(h) - f(0)h = lim_h to 0 fracf(h)h \
                &= lim_hto 0 begincases 0 & textif h ge 0 \ h & textif h < 0 endcases.
                endalign*
                Thus clearly we have $lim_hto 0^+ fracf(h)h = lim_hto 0^- fracf(h)h = 0$, so $f'(0) = 0$. Hence,
                $$f'(x) = begincases 0 & textif x ge 0 \ 2x & textif x < 0 endcases.$$
                Such a function could only be discontinuous at $0$, but the left and right limits both agree with the function value, so it's continuous.



                It is not, however, differentiable at $0$. Note that
                beginalign*
                f''(0) &= lim_h to 0 fracf'(h) - f'(0)h = lim_h to 0 fracf'(h)h \
                &= lim_hto 0 begincases 0 & textif h ge 0 \ 2 & textif h < 0 endcases.
                endalign*
                Clearly, in this case, the left and right limits are $2$ and $0$ respectively. Hence the limit (and the second derivative at $0$) doesn't exist.






                share|cite|improve this answer












                It's certainly continuously differentiable (i.e. $C^1$), but it isn't $C^2$. To see this first compute the derivative. For $x_0 > 0$, the function is constant around $x_0$, and hence has a derivative of $0$. For $x_0 < 0$, the function is equal to $x^2$ around $x_0$, so the derivative is $2x_0$. The only case left to check is $x = 0$.



                We have
                beginalign*
                f'(0) &= lim_h to 0 fracf(h) - f(0)h = lim_h to 0 fracf(h)h \
                &= lim_hto 0 begincases 0 & textif h ge 0 \ h & textif h < 0 endcases.
                endalign*
                Thus clearly we have $lim_hto 0^+ fracf(h)h = lim_hto 0^- fracf(h)h = 0$, so $f'(0) = 0$. Hence,
                $$f'(x) = begincases 0 & textif x ge 0 \ 2x & textif x < 0 endcases.$$
                Such a function could only be discontinuous at $0$, but the left and right limits both agree with the function value, so it's continuous.



                It is not, however, differentiable at $0$. Note that
                beginalign*
                f''(0) &= lim_h to 0 fracf'(h) - f'(0)h = lim_h to 0 fracf'(h)h \
                &= lim_hto 0 begincases 0 & textif h ge 0 \ 2 & textif h < 0 endcases.
                endalign*
                Clearly, in this case, the left and right limits are $2$ and $0$ respectively. Hence the limit (and the second derivative at $0$) doesn't exist.







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Aug 20 at 13:23









                Theo Bendit

                12.3k1844




                12.3k1844






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2888766%2fcontinuous-function-of-class-c2-that-consists-of-cases-0-if-x-geq-0-posi%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    這個網誌中的熱門文章

                    How to combine Bézier curves to a surface?

                    Carbon dioxide

                    Why am i infinitely getting the same tweet with the Twitter Search API?