A function that is differentiable at exactly two points












0












$begingroup$


As homework we were given 2 questions:




  1. Find a function that is continuous at exactly one point and not differentiable there.


  2. Find a function that is differentiable at exactly two points.



The answer to the first one was somewhat simple - $ f(x) = x*D(x) $, wherein $ D(x) $ stands for Dirichlet function.



I've been thinking about the second question for a while, and someone suggested me the following:
$ g(x) = x^2*D(x) $



$ f(x) = (x-1)^2 * g(x) $



Claiming that $f(x)$ is only differentiable in $ x = 0, x = 1 $.
Why is that?










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    It follows the exactly same proof to that $x^2D(x)$ is only differentiable in $x=0$. Note that $g(x-1) = (x-1)^2 D(x-1)$ and $D(x-1)=D(x)$.
    $endgroup$
    – Yanko
    Jan 12 at 17:39
















0












$begingroup$


As homework we were given 2 questions:




  1. Find a function that is continuous at exactly one point and not differentiable there.


  2. Find a function that is differentiable at exactly two points.



The answer to the first one was somewhat simple - $ f(x) = x*D(x) $, wherein $ D(x) $ stands for Dirichlet function.



I've been thinking about the second question for a while, and someone suggested me the following:
$ g(x) = x^2*D(x) $



$ f(x) = (x-1)^2 * g(x) $



Claiming that $f(x)$ is only differentiable in $ x = 0, x = 1 $.
Why is that?










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    It follows the exactly same proof to that $x^2D(x)$ is only differentiable in $x=0$. Note that $g(x-1) = (x-1)^2 D(x-1)$ and $D(x-1)=D(x)$.
    $endgroup$
    – Yanko
    Jan 12 at 17:39














0












0








0





$begingroup$


As homework we were given 2 questions:




  1. Find a function that is continuous at exactly one point and not differentiable there.


  2. Find a function that is differentiable at exactly two points.



The answer to the first one was somewhat simple - $ f(x) = x*D(x) $, wherein $ D(x) $ stands for Dirichlet function.



I've been thinking about the second question for a while, and someone suggested me the following:
$ g(x) = x^2*D(x) $



$ f(x) = (x-1)^2 * g(x) $



Claiming that $f(x)$ is only differentiable in $ x = 0, x = 1 $.
Why is that?










share|cite|improve this question









$endgroup$




As homework we were given 2 questions:




  1. Find a function that is continuous at exactly one point and not differentiable there.


  2. Find a function that is differentiable at exactly two points.



The answer to the first one was somewhat simple - $ f(x) = x*D(x) $, wherein $ D(x) $ stands for Dirichlet function.



I've been thinking about the second question for a while, and someone suggested me the following:
$ g(x) = x^2*D(x) $



$ f(x) = (x-1)^2 * g(x) $



Claiming that $f(x)$ is only differentiable in $ x = 0, x = 1 $.
Why is that?







calculus derivatives






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 12 at 17:37









TegernakoTegernako

888




888








  • 1




    $begingroup$
    It follows the exactly same proof to that $x^2D(x)$ is only differentiable in $x=0$. Note that $g(x-1) = (x-1)^2 D(x-1)$ and $D(x-1)=D(x)$.
    $endgroup$
    – Yanko
    Jan 12 at 17:39














  • 1




    $begingroup$
    It follows the exactly same proof to that $x^2D(x)$ is only differentiable in $x=0$. Note that $g(x-1) = (x-1)^2 D(x-1)$ and $D(x-1)=D(x)$.
    $endgroup$
    – Yanko
    Jan 12 at 17:39








1




1




$begingroup$
It follows the exactly same proof to that $x^2D(x)$ is only differentiable in $x=0$. Note that $g(x-1) = (x-1)^2 D(x-1)$ and $D(x-1)=D(x)$.
$endgroup$
– Yanko
Jan 12 at 17:39




$begingroup$
It follows the exactly same proof to that $x^2D(x)$ is only differentiable in $x=0$. Note that $g(x-1) = (x-1)^2 D(x-1)$ and $D(x-1)=D(x)$.
$endgroup$
– Yanko
Jan 12 at 17:39










2 Answers
2






active

oldest

votes


















3












$begingroup$

It is simplier to say that$$g(x)=begin{cases}x^2(x-1)^2&text{ if }xinmathbb Q\0&text{ otherwise.}end{cases}$$And, yes, this exmple works. Outside ${0,1}$ $g$ is discontinuous, and therefore non-differentiable. And it follows from the definition of $g'$ that $g'(0)=g'(1)=0$.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Good example...
    $endgroup$
    – Cloud JR
    Jan 12 at 17:45










  • $begingroup$
    An excellent example, thank you!
    $endgroup$
    – Tegernako
    Jan 12 at 18:04






  • 1




    $begingroup$
    It's your example. I just used a different notation. Anyway, I'm glad I could help.
    $endgroup$
    – José Carlos Santos
    Jan 12 at 18:06



















1












$begingroup$

Clearly, $f$ is not differentiable away from $0$ and $1$: the $x^2$ and $(x-1)^2$ factors don't fix the horribleness of the Dirichlet function there: a rational $y$ near some $x$ is sent near to $x^2(x-1)^2$, while an irrational $y$ near $x$ is sent to $0$, and those differ, so $f$ isn't even continuous away from $0$ and $1$.



So, why is it differentiable at $0$ and $1$: well, let's just check the definition.



$$lim_{xto 0}frac{f(x)-f(0)}{x} = lim_{xto 0}frac{x^2(x-1)^2D(x)}{x} = lim_{xto 0}x(x-1)^2D(x),$$
and $|x(x-1)^2D(x)| leq |x|(x-1)^2 to 0$ as $x to 0$, so the limit exists, and is zero, at $0$. Similarly,
$$lim_{xto 1}frac{f(x)-f(1)}{x-1} = lim_{xto 1}x^2(x-1)D(x),$$
and $|x^2(x-1)D(x)| leq x^2|x-1| to 0$ as $x to 1$.






share|cite|improve this answer









$endgroup$













    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',
    autoActivateHeartbeat: false,
    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%2f3071164%2fa-function-that-is-differentiable-at-exactly-two-points%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









    3












    $begingroup$

    It is simplier to say that$$g(x)=begin{cases}x^2(x-1)^2&text{ if }xinmathbb Q\0&text{ otherwise.}end{cases}$$And, yes, this exmple works. Outside ${0,1}$ $g$ is discontinuous, and therefore non-differentiable. And it follows from the definition of $g'$ that $g'(0)=g'(1)=0$.






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      Good example...
      $endgroup$
      – Cloud JR
      Jan 12 at 17:45










    • $begingroup$
      An excellent example, thank you!
      $endgroup$
      – Tegernako
      Jan 12 at 18:04






    • 1




      $begingroup$
      It's your example. I just used a different notation. Anyway, I'm glad I could help.
      $endgroup$
      – José Carlos Santos
      Jan 12 at 18:06
















    3












    $begingroup$

    It is simplier to say that$$g(x)=begin{cases}x^2(x-1)^2&text{ if }xinmathbb Q\0&text{ otherwise.}end{cases}$$And, yes, this exmple works. Outside ${0,1}$ $g$ is discontinuous, and therefore non-differentiable. And it follows from the definition of $g'$ that $g'(0)=g'(1)=0$.






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      Good example...
      $endgroup$
      – Cloud JR
      Jan 12 at 17:45










    • $begingroup$
      An excellent example, thank you!
      $endgroup$
      – Tegernako
      Jan 12 at 18:04






    • 1




      $begingroup$
      It's your example. I just used a different notation. Anyway, I'm glad I could help.
      $endgroup$
      – José Carlos Santos
      Jan 12 at 18:06














    3












    3








    3





    $begingroup$

    It is simplier to say that$$g(x)=begin{cases}x^2(x-1)^2&text{ if }xinmathbb Q\0&text{ otherwise.}end{cases}$$And, yes, this exmple works. Outside ${0,1}$ $g$ is discontinuous, and therefore non-differentiable. And it follows from the definition of $g'$ that $g'(0)=g'(1)=0$.






    share|cite|improve this answer









    $endgroup$



    It is simplier to say that$$g(x)=begin{cases}x^2(x-1)^2&text{ if }xinmathbb Q\0&text{ otherwise.}end{cases}$$And, yes, this exmple works. Outside ${0,1}$ $g$ is discontinuous, and therefore non-differentiable. And it follows from the definition of $g'$ that $g'(0)=g'(1)=0$.







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Jan 12 at 17:41









    José Carlos SantosJosé Carlos Santos

    157k22126227




    157k22126227












    • $begingroup$
      Good example...
      $endgroup$
      – Cloud JR
      Jan 12 at 17:45










    • $begingroup$
      An excellent example, thank you!
      $endgroup$
      – Tegernako
      Jan 12 at 18:04






    • 1




      $begingroup$
      It's your example. I just used a different notation. Anyway, I'm glad I could help.
      $endgroup$
      – José Carlos Santos
      Jan 12 at 18:06


















    • $begingroup$
      Good example...
      $endgroup$
      – Cloud JR
      Jan 12 at 17:45










    • $begingroup$
      An excellent example, thank you!
      $endgroup$
      – Tegernako
      Jan 12 at 18:04






    • 1




      $begingroup$
      It's your example. I just used a different notation. Anyway, I'm glad I could help.
      $endgroup$
      – José Carlos Santos
      Jan 12 at 18:06
















    $begingroup$
    Good example...
    $endgroup$
    – Cloud JR
    Jan 12 at 17:45




    $begingroup$
    Good example...
    $endgroup$
    – Cloud JR
    Jan 12 at 17:45












    $begingroup$
    An excellent example, thank you!
    $endgroup$
    – Tegernako
    Jan 12 at 18:04




    $begingroup$
    An excellent example, thank you!
    $endgroup$
    – Tegernako
    Jan 12 at 18:04




    1




    1




    $begingroup$
    It's your example. I just used a different notation. Anyway, I'm glad I could help.
    $endgroup$
    – José Carlos Santos
    Jan 12 at 18:06




    $begingroup$
    It's your example. I just used a different notation. Anyway, I'm glad I could help.
    $endgroup$
    – José Carlos Santos
    Jan 12 at 18:06











    1












    $begingroup$

    Clearly, $f$ is not differentiable away from $0$ and $1$: the $x^2$ and $(x-1)^2$ factors don't fix the horribleness of the Dirichlet function there: a rational $y$ near some $x$ is sent near to $x^2(x-1)^2$, while an irrational $y$ near $x$ is sent to $0$, and those differ, so $f$ isn't even continuous away from $0$ and $1$.



    So, why is it differentiable at $0$ and $1$: well, let's just check the definition.



    $$lim_{xto 0}frac{f(x)-f(0)}{x} = lim_{xto 0}frac{x^2(x-1)^2D(x)}{x} = lim_{xto 0}x(x-1)^2D(x),$$
    and $|x(x-1)^2D(x)| leq |x|(x-1)^2 to 0$ as $x to 0$, so the limit exists, and is zero, at $0$. Similarly,
    $$lim_{xto 1}frac{f(x)-f(1)}{x-1} = lim_{xto 1}x^2(x-1)D(x),$$
    and $|x^2(x-1)D(x)| leq x^2|x-1| to 0$ as $x to 1$.






    share|cite|improve this answer









    $endgroup$


















      1












      $begingroup$

      Clearly, $f$ is not differentiable away from $0$ and $1$: the $x^2$ and $(x-1)^2$ factors don't fix the horribleness of the Dirichlet function there: a rational $y$ near some $x$ is sent near to $x^2(x-1)^2$, while an irrational $y$ near $x$ is sent to $0$, and those differ, so $f$ isn't even continuous away from $0$ and $1$.



      So, why is it differentiable at $0$ and $1$: well, let's just check the definition.



      $$lim_{xto 0}frac{f(x)-f(0)}{x} = lim_{xto 0}frac{x^2(x-1)^2D(x)}{x} = lim_{xto 0}x(x-1)^2D(x),$$
      and $|x(x-1)^2D(x)| leq |x|(x-1)^2 to 0$ as $x to 0$, so the limit exists, and is zero, at $0$. Similarly,
      $$lim_{xto 1}frac{f(x)-f(1)}{x-1} = lim_{xto 1}x^2(x-1)D(x),$$
      and $|x^2(x-1)D(x)| leq x^2|x-1| to 0$ as $x to 1$.






      share|cite|improve this answer









      $endgroup$
















        1












        1








        1





        $begingroup$

        Clearly, $f$ is not differentiable away from $0$ and $1$: the $x^2$ and $(x-1)^2$ factors don't fix the horribleness of the Dirichlet function there: a rational $y$ near some $x$ is sent near to $x^2(x-1)^2$, while an irrational $y$ near $x$ is sent to $0$, and those differ, so $f$ isn't even continuous away from $0$ and $1$.



        So, why is it differentiable at $0$ and $1$: well, let's just check the definition.



        $$lim_{xto 0}frac{f(x)-f(0)}{x} = lim_{xto 0}frac{x^2(x-1)^2D(x)}{x} = lim_{xto 0}x(x-1)^2D(x),$$
        and $|x(x-1)^2D(x)| leq |x|(x-1)^2 to 0$ as $x to 0$, so the limit exists, and is zero, at $0$. Similarly,
        $$lim_{xto 1}frac{f(x)-f(1)}{x-1} = lim_{xto 1}x^2(x-1)D(x),$$
        and $|x^2(x-1)D(x)| leq x^2|x-1| to 0$ as $x to 1$.






        share|cite|improve this answer









        $endgroup$



        Clearly, $f$ is not differentiable away from $0$ and $1$: the $x^2$ and $(x-1)^2$ factors don't fix the horribleness of the Dirichlet function there: a rational $y$ near some $x$ is sent near to $x^2(x-1)^2$, while an irrational $y$ near $x$ is sent to $0$, and those differ, so $f$ isn't even continuous away from $0$ and $1$.



        So, why is it differentiable at $0$ and $1$: well, let's just check the definition.



        $$lim_{xto 0}frac{f(x)-f(0)}{x} = lim_{xto 0}frac{x^2(x-1)^2D(x)}{x} = lim_{xto 0}x(x-1)^2D(x),$$
        and $|x(x-1)^2D(x)| leq |x|(x-1)^2 to 0$ as $x to 0$, so the limit exists, and is zero, at $0$. Similarly,
        $$lim_{xto 1}frac{f(x)-f(1)}{x-1} = lim_{xto 1}x^2(x-1)D(x),$$
        and $|x^2(x-1)D(x)| leq x^2|x-1| to 0$ as $x to 1$.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Jan 12 at 17:45









        user3482749user3482749

        4,197919




        4,197919






























            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3071164%2fa-function-that-is-differentiable-at-exactly-two-points%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

            Mario Kart Wii

            What does “Dominus providebit” mean?

            Antonio Litta Visconti Arese