If function is positive and continuous at a point, then it is positive in a neighborhood of the point?












2












$begingroup$


Let $f:mathbb Rrightarrow mathbb R$ be defined as
$$
f(x) = left{ begin{array}{c}
x-x^2 & text{ if } xinmathbb Q \
x+x^2 & text{ if } xnotin mathbb Q.
end{array}
right.
$$

Show that $f'(0)=1$ and yet there is no neighborhood of the point $0$ on which $f$ is monotonically increasing.



For the first part, using the density of irrationals we have
$$f'(0)=text{lim}_{xrightarrow0^-}frac{f(x)-f(0)}{x-0}=text{lim}_{xrightarrow0^+}frac{f(x)-f(0)}{x-0}=frac{x+x^2-0}{x-0}=1.$$ Is it correct?



For the second part, I've read in the book that "if a function is positive and continuous at a point, then it is positive in a neighborhood of the point." So why is this not working here? And how should I prove that there is no neighborhood of the point $0$ on which $f$ is monotonically increasing?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Why did you choose to forget about the rationals in your limit computation? For the rest: where is $f$ differentiable (or even continuous)?
    $endgroup$
    – Mindlack
    Jan 26 at 23:24










  • $begingroup$
    Just because the irrationals are dense in $mathbb R$, you still have to show that the limit of interest is $1$ when restricted to rationals. The fact that $mathbb Q$ and $mathbb R setminus mathbb Q$ are dense in $mathbb R$ seems more useful for showing that $f$ is not monotone increasing on any neighborhood of $0 in mathbb R$. What you have read (the quote) is true but I am unsure how it is helpful here.
    $endgroup$
    – Matt A Pelto
    Jan 26 at 23:35












  • $begingroup$
    f is continuous at 0 but not positive at 0. f' is positive at 0 but not continuous at 0.
    $endgroup$
    – William Elliot
    Jan 26 at 23:43










  • $begingroup$
    @WilliamElliot why is $f'$ not continuous at $0$? Doesn't it always approach $1$ as well as $f(0)=1$?
    $endgroup$
    – MetaColon
    Jan 26 at 23:52






  • 1




    $begingroup$
    If $x ne 0$ then $f'(x) = lim_{hto 0} frac {f(x+h) - f(x)}h=lim frac {x pm x^2 pm 2hx pm h^2 - x pm x^2}h = lim frac {{pm 2x^2,0}}h + pm 2x$ does not have consistent values depending upon whether $x$ and $x + h$ are both rational, irrational or of different types. So $f'$ doesn't exist anywhere but at $x=1$. So $f'(x)$ is not continuous at $x=0$.
    $endgroup$
    – fleablood
    Jan 27 at 0:14
















2












$begingroup$


Let $f:mathbb Rrightarrow mathbb R$ be defined as
$$
f(x) = left{ begin{array}{c}
x-x^2 & text{ if } xinmathbb Q \
x+x^2 & text{ if } xnotin mathbb Q.
end{array}
right.
$$

Show that $f'(0)=1$ and yet there is no neighborhood of the point $0$ on which $f$ is monotonically increasing.



For the first part, using the density of irrationals we have
$$f'(0)=text{lim}_{xrightarrow0^-}frac{f(x)-f(0)}{x-0}=text{lim}_{xrightarrow0^+}frac{f(x)-f(0)}{x-0}=frac{x+x^2-0}{x-0}=1.$$ Is it correct?



For the second part, I've read in the book that "if a function is positive and continuous at a point, then it is positive in a neighborhood of the point." So why is this not working here? And how should I prove that there is no neighborhood of the point $0$ on which $f$ is monotonically increasing?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Why did you choose to forget about the rationals in your limit computation? For the rest: where is $f$ differentiable (or even continuous)?
    $endgroup$
    – Mindlack
    Jan 26 at 23:24










  • $begingroup$
    Just because the irrationals are dense in $mathbb R$, you still have to show that the limit of interest is $1$ when restricted to rationals. The fact that $mathbb Q$ and $mathbb R setminus mathbb Q$ are dense in $mathbb R$ seems more useful for showing that $f$ is not monotone increasing on any neighborhood of $0 in mathbb R$. What you have read (the quote) is true but I am unsure how it is helpful here.
    $endgroup$
    – Matt A Pelto
    Jan 26 at 23:35












  • $begingroup$
    f is continuous at 0 but not positive at 0. f' is positive at 0 but not continuous at 0.
    $endgroup$
    – William Elliot
    Jan 26 at 23:43










  • $begingroup$
    @WilliamElliot why is $f'$ not continuous at $0$? Doesn't it always approach $1$ as well as $f(0)=1$?
    $endgroup$
    – MetaColon
    Jan 26 at 23:52






  • 1




    $begingroup$
    If $x ne 0$ then $f'(x) = lim_{hto 0} frac {f(x+h) - f(x)}h=lim frac {x pm x^2 pm 2hx pm h^2 - x pm x^2}h = lim frac {{pm 2x^2,0}}h + pm 2x$ does not have consistent values depending upon whether $x$ and $x + h$ are both rational, irrational or of different types. So $f'$ doesn't exist anywhere but at $x=1$. So $f'(x)$ is not continuous at $x=0$.
    $endgroup$
    – fleablood
    Jan 27 at 0:14














2












2








2





$begingroup$


Let $f:mathbb Rrightarrow mathbb R$ be defined as
$$
f(x) = left{ begin{array}{c}
x-x^2 & text{ if } xinmathbb Q \
x+x^2 & text{ if } xnotin mathbb Q.
end{array}
right.
$$

Show that $f'(0)=1$ and yet there is no neighborhood of the point $0$ on which $f$ is monotonically increasing.



For the first part, using the density of irrationals we have
$$f'(0)=text{lim}_{xrightarrow0^-}frac{f(x)-f(0)}{x-0}=text{lim}_{xrightarrow0^+}frac{f(x)-f(0)}{x-0}=frac{x+x^2-0}{x-0}=1.$$ Is it correct?



For the second part, I've read in the book that "if a function is positive and continuous at a point, then it is positive in a neighborhood of the point." So why is this not working here? And how should I prove that there is no neighborhood of the point $0$ on which $f$ is monotonically increasing?










share|cite|improve this question











$endgroup$




Let $f:mathbb Rrightarrow mathbb R$ be defined as
$$
f(x) = left{ begin{array}{c}
x-x^2 & text{ if } xinmathbb Q \
x+x^2 & text{ if } xnotin mathbb Q.
end{array}
right.
$$

Show that $f'(0)=1$ and yet there is no neighborhood of the point $0$ on which $f$ is monotonically increasing.



For the first part, using the density of irrationals we have
$$f'(0)=text{lim}_{xrightarrow0^-}frac{f(x)-f(0)}{x-0}=text{lim}_{xrightarrow0^+}frac{f(x)-f(0)}{x-0}=frac{x+x^2-0}{x-0}=1.$$ Is it correct?



For the second part, I've read in the book that "if a function is positive and continuous at a point, then it is positive in a neighborhood of the point." So why is this not working here? And how should I prove that there is no neighborhood of the point $0$ on which $f$ is monotonically increasing?







real-analysis






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 27 at 23:28









DeepSea

71.3k54488




71.3k54488










asked Jan 26 at 23:20









dxdydzdxdydz

42110




42110








  • 1




    $begingroup$
    Why did you choose to forget about the rationals in your limit computation? For the rest: where is $f$ differentiable (or even continuous)?
    $endgroup$
    – Mindlack
    Jan 26 at 23:24










  • $begingroup$
    Just because the irrationals are dense in $mathbb R$, you still have to show that the limit of interest is $1$ when restricted to rationals. The fact that $mathbb Q$ and $mathbb R setminus mathbb Q$ are dense in $mathbb R$ seems more useful for showing that $f$ is not monotone increasing on any neighborhood of $0 in mathbb R$. What you have read (the quote) is true but I am unsure how it is helpful here.
    $endgroup$
    – Matt A Pelto
    Jan 26 at 23:35












  • $begingroup$
    f is continuous at 0 but not positive at 0. f' is positive at 0 but not continuous at 0.
    $endgroup$
    – William Elliot
    Jan 26 at 23:43










  • $begingroup$
    @WilliamElliot why is $f'$ not continuous at $0$? Doesn't it always approach $1$ as well as $f(0)=1$?
    $endgroup$
    – MetaColon
    Jan 26 at 23:52






  • 1




    $begingroup$
    If $x ne 0$ then $f'(x) = lim_{hto 0} frac {f(x+h) - f(x)}h=lim frac {x pm x^2 pm 2hx pm h^2 - x pm x^2}h = lim frac {{pm 2x^2,0}}h + pm 2x$ does not have consistent values depending upon whether $x$ and $x + h$ are both rational, irrational or of different types. So $f'$ doesn't exist anywhere but at $x=1$. So $f'(x)$ is not continuous at $x=0$.
    $endgroup$
    – fleablood
    Jan 27 at 0:14














  • 1




    $begingroup$
    Why did you choose to forget about the rationals in your limit computation? For the rest: where is $f$ differentiable (or even continuous)?
    $endgroup$
    – Mindlack
    Jan 26 at 23:24










  • $begingroup$
    Just because the irrationals are dense in $mathbb R$, you still have to show that the limit of interest is $1$ when restricted to rationals. The fact that $mathbb Q$ and $mathbb R setminus mathbb Q$ are dense in $mathbb R$ seems more useful for showing that $f$ is not monotone increasing on any neighborhood of $0 in mathbb R$. What you have read (the quote) is true but I am unsure how it is helpful here.
    $endgroup$
    – Matt A Pelto
    Jan 26 at 23:35












  • $begingroup$
    f is continuous at 0 but not positive at 0. f' is positive at 0 but not continuous at 0.
    $endgroup$
    – William Elliot
    Jan 26 at 23:43










  • $begingroup$
    @WilliamElliot why is $f'$ not continuous at $0$? Doesn't it always approach $1$ as well as $f(0)=1$?
    $endgroup$
    – MetaColon
    Jan 26 at 23:52






  • 1




    $begingroup$
    If $x ne 0$ then $f'(x) = lim_{hto 0} frac {f(x+h) - f(x)}h=lim frac {x pm x^2 pm 2hx pm h^2 - x pm x^2}h = lim frac {{pm 2x^2,0}}h + pm 2x$ does not have consistent values depending upon whether $x$ and $x + h$ are both rational, irrational or of different types. So $f'$ doesn't exist anywhere but at $x=1$. So $f'(x)$ is not continuous at $x=0$.
    $endgroup$
    – fleablood
    Jan 27 at 0:14








1




1




$begingroup$
Why did you choose to forget about the rationals in your limit computation? For the rest: where is $f$ differentiable (or even continuous)?
$endgroup$
– Mindlack
Jan 26 at 23:24




$begingroup$
Why did you choose to forget about the rationals in your limit computation? For the rest: where is $f$ differentiable (or even continuous)?
$endgroup$
– Mindlack
Jan 26 at 23:24












$begingroup$
Just because the irrationals are dense in $mathbb R$, you still have to show that the limit of interest is $1$ when restricted to rationals. The fact that $mathbb Q$ and $mathbb R setminus mathbb Q$ are dense in $mathbb R$ seems more useful for showing that $f$ is not monotone increasing on any neighborhood of $0 in mathbb R$. What you have read (the quote) is true but I am unsure how it is helpful here.
$endgroup$
– Matt A Pelto
Jan 26 at 23:35






$begingroup$
Just because the irrationals are dense in $mathbb R$, you still have to show that the limit of interest is $1$ when restricted to rationals. The fact that $mathbb Q$ and $mathbb R setminus mathbb Q$ are dense in $mathbb R$ seems more useful for showing that $f$ is not monotone increasing on any neighborhood of $0 in mathbb R$. What you have read (the quote) is true but I am unsure how it is helpful here.
$endgroup$
– Matt A Pelto
Jan 26 at 23:35














$begingroup$
f is continuous at 0 but not positive at 0. f' is positive at 0 but not continuous at 0.
$endgroup$
– William Elliot
Jan 26 at 23:43




$begingroup$
f is continuous at 0 but not positive at 0. f' is positive at 0 but not continuous at 0.
$endgroup$
– William Elliot
Jan 26 at 23:43












$begingroup$
@WilliamElliot why is $f'$ not continuous at $0$? Doesn't it always approach $1$ as well as $f(0)=1$?
$endgroup$
– MetaColon
Jan 26 at 23:52




$begingroup$
@WilliamElliot why is $f'$ not continuous at $0$? Doesn't it always approach $1$ as well as $f(0)=1$?
$endgroup$
– MetaColon
Jan 26 at 23:52




1




1




$begingroup$
If $x ne 0$ then $f'(x) = lim_{hto 0} frac {f(x+h) - f(x)}h=lim frac {x pm x^2 pm 2hx pm h^2 - x pm x^2}h = lim frac {{pm 2x^2,0}}h + pm 2x$ does not have consistent values depending upon whether $x$ and $x + h$ are both rational, irrational or of different types. So $f'$ doesn't exist anywhere but at $x=1$. So $f'(x)$ is not continuous at $x=0$.
$endgroup$
– fleablood
Jan 27 at 0:14




$begingroup$
If $x ne 0$ then $f'(x) = lim_{hto 0} frac {f(x+h) - f(x)}h=lim frac {x pm x^2 pm 2hx pm h^2 - x pm x^2}h = lim frac {{pm 2x^2,0}}h + pm 2x$ does not have consistent values depending upon whether $x$ and $x + h$ are both rational, irrational or of different types. So $f'$ doesn't exist anywhere but at $x=1$. So $f'(x)$ is not continuous at $x=0$.
$endgroup$
– fleablood
Jan 27 at 0:14










2 Answers
2






active

oldest

votes


















1












$begingroup$

$a)$: We can rewrite $f(x) - x = left { begin {array} {c} -x^2 & text{ if } x in mathbb{Q}\
x^2 & text{ if } x notin mathbb{Q}. end{array}\
right.$
. Thus $displaystyle lim_{x to 0} left|dfrac{f(x) - f(0)}{x-0} - 1right|= displaystyle lim_{x to 0} left|dfrac{f(x)-x}{x}right|= displaystyle lim_{x to 0} left|dfrac{x^2}{x}right|= displaystyle lim_{x to 0} |x| = 0implies displaystyle lim_{x to 0} left(dfrac{f(x)-f(0)}{x-0} - 1right) = 0implies displaystyle lim_{x to 0} dfrac{f(x) - f(0)}{x-0} = 1implies f'(0) = 1$.



$b)$: Let $a > 0$ and consider $(-a,a)$ be a neighborhood of $0$. We might consider further that $a < dfrac{1}{2}, a in mathbb{Q}$. Observe that $dfrac{-1+sqrt{1+4a-4a^2}}{2}< aimplies $ if we take an irrational number $b in left(dfrac{-1+sqrt{1+4a-4a^2}}{2}, aright)$ then $b+b^2 > a-a^2implies f(b) > f(a)$. Next we choose a rational number $d in (0, b)implies d < b implies d-d^2 < b < b+b^2 implies d-d^2 < b+b^2implies f(d) < f(b)$. Thus we have: $d < b < a $ and $f(d) < f(b) > f(a)$, proving $f$ is not monotonically increasing.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    any ideas for the second part?
    $endgroup$
    – dxdydz
    Jan 27 at 3:40










  • $begingroup$
    I dont understand, where did $frac{-1+sqrt{1+4a-4a^2}}{2}<a$ come from?
    $endgroup$
    – dxdydz
    Jan 28 at 16:18












  • $begingroup$
    It comes from solving for $b$ the solutions of the inequality: $b^2+b > a-a^2$ and the expression above is solution of $b$ using quadratic formula.
    $endgroup$
    – DeepSea
    Jan 28 at 21:05



















0












$begingroup$

Keep in mind that a function can only be differentiable where it is continuous (and not always there, either).



The density of the rationals and irrationals in the reals means that this piecewise function will only be continuous (and, therefore, may only be differentiable) where the two definitional formulas agree. That is, for $f$ to be continuous, we require that $$x-x^2=x+x^2\0=2x^2\0=x^2\0=x.$$



Now, to prove that $f'(0)$ even exists, we have to show that $$lim_{xto 0}frac{x-x^2-f(0)}{x-0}=lim_{xto 0}frac{x+x^2-f(0)}{x-0},$$ but this is easily seen, since $f(0)=0,$ so that we need only show that $$lim_{xto 0}frac{x-x^2}{x}=lim_{xto 0}frac{x+x^2}{x},$$ or (equivalently) that $$lim_{xto 0}1-x=lim_{xto 0}1+x.$$ I leave it to you to show that both limits exist, and that both are equal to $1,$ so that $f'(0)=1.$



On the other hand, given any $x_0neq 0,$ we can readily show that $$lim_{xto x_0}frac{x-x^2}{x}neqlim_{xto x_0}frac{x+x^2}{x},$$ so that $f'$ is defined only at $x=0.$



What your book leaves out (apparently) is that the neighborhood of the point must be a relative neighborhood of the function's domain. In this case, this means that there must be some (more general) neighborhood (say $U$) of the point $0$ such that, for all $xinoperatorname{dom}(f')cap U,$ we have that $f(x)>0.$ But this is trivially true, regardless of the neighborhood $U$ we choose, since $f'$ is defined only at $x=0,$ so that $operatorname{dom}(f')cap U={0},$ whence $f'$ is positive in a relative neighborhood of $x=0,$ as desired.






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%2f3088914%2fif-function-is-positive-and-continuous-at-a-point-then-it-is-positive-in-a-neig%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









    1












    $begingroup$

    $a)$: We can rewrite $f(x) - x = left { begin {array} {c} -x^2 & text{ if } x in mathbb{Q}\
    x^2 & text{ if } x notin mathbb{Q}. end{array}\
    right.$
    . Thus $displaystyle lim_{x to 0} left|dfrac{f(x) - f(0)}{x-0} - 1right|= displaystyle lim_{x to 0} left|dfrac{f(x)-x}{x}right|= displaystyle lim_{x to 0} left|dfrac{x^2}{x}right|= displaystyle lim_{x to 0} |x| = 0implies displaystyle lim_{x to 0} left(dfrac{f(x)-f(0)}{x-0} - 1right) = 0implies displaystyle lim_{x to 0} dfrac{f(x) - f(0)}{x-0} = 1implies f'(0) = 1$.



    $b)$: Let $a > 0$ and consider $(-a,a)$ be a neighborhood of $0$. We might consider further that $a < dfrac{1}{2}, a in mathbb{Q}$. Observe that $dfrac{-1+sqrt{1+4a-4a^2}}{2}< aimplies $ if we take an irrational number $b in left(dfrac{-1+sqrt{1+4a-4a^2}}{2}, aright)$ then $b+b^2 > a-a^2implies f(b) > f(a)$. Next we choose a rational number $d in (0, b)implies d < b implies d-d^2 < b < b+b^2 implies d-d^2 < b+b^2implies f(d) < f(b)$. Thus we have: $d < b < a $ and $f(d) < f(b) > f(a)$, proving $f$ is not monotonically increasing.






    share|cite|improve this answer











    $endgroup$













    • $begingroup$
      any ideas for the second part?
      $endgroup$
      – dxdydz
      Jan 27 at 3:40










    • $begingroup$
      I dont understand, where did $frac{-1+sqrt{1+4a-4a^2}}{2}<a$ come from?
      $endgroup$
      – dxdydz
      Jan 28 at 16:18












    • $begingroup$
      It comes from solving for $b$ the solutions of the inequality: $b^2+b > a-a^2$ and the expression above is solution of $b$ using quadratic formula.
      $endgroup$
      – DeepSea
      Jan 28 at 21:05
















    1












    $begingroup$

    $a)$: We can rewrite $f(x) - x = left { begin {array} {c} -x^2 & text{ if } x in mathbb{Q}\
    x^2 & text{ if } x notin mathbb{Q}. end{array}\
    right.$
    . Thus $displaystyle lim_{x to 0} left|dfrac{f(x) - f(0)}{x-0} - 1right|= displaystyle lim_{x to 0} left|dfrac{f(x)-x}{x}right|= displaystyle lim_{x to 0} left|dfrac{x^2}{x}right|= displaystyle lim_{x to 0} |x| = 0implies displaystyle lim_{x to 0} left(dfrac{f(x)-f(0)}{x-0} - 1right) = 0implies displaystyle lim_{x to 0} dfrac{f(x) - f(0)}{x-0} = 1implies f'(0) = 1$.



    $b)$: Let $a > 0$ and consider $(-a,a)$ be a neighborhood of $0$. We might consider further that $a < dfrac{1}{2}, a in mathbb{Q}$. Observe that $dfrac{-1+sqrt{1+4a-4a^2}}{2}< aimplies $ if we take an irrational number $b in left(dfrac{-1+sqrt{1+4a-4a^2}}{2}, aright)$ then $b+b^2 > a-a^2implies f(b) > f(a)$. Next we choose a rational number $d in (0, b)implies d < b implies d-d^2 < b < b+b^2 implies d-d^2 < b+b^2implies f(d) < f(b)$. Thus we have: $d < b < a $ and $f(d) < f(b) > f(a)$, proving $f$ is not monotonically increasing.






    share|cite|improve this answer











    $endgroup$













    • $begingroup$
      any ideas for the second part?
      $endgroup$
      – dxdydz
      Jan 27 at 3:40










    • $begingroup$
      I dont understand, where did $frac{-1+sqrt{1+4a-4a^2}}{2}<a$ come from?
      $endgroup$
      – dxdydz
      Jan 28 at 16:18












    • $begingroup$
      It comes from solving for $b$ the solutions of the inequality: $b^2+b > a-a^2$ and the expression above is solution of $b$ using quadratic formula.
      $endgroup$
      – DeepSea
      Jan 28 at 21:05














    1












    1








    1





    $begingroup$

    $a)$: We can rewrite $f(x) - x = left { begin {array} {c} -x^2 & text{ if } x in mathbb{Q}\
    x^2 & text{ if } x notin mathbb{Q}. end{array}\
    right.$
    . Thus $displaystyle lim_{x to 0} left|dfrac{f(x) - f(0)}{x-0} - 1right|= displaystyle lim_{x to 0} left|dfrac{f(x)-x}{x}right|= displaystyle lim_{x to 0} left|dfrac{x^2}{x}right|= displaystyle lim_{x to 0} |x| = 0implies displaystyle lim_{x to 0} left(dfrac{f(x)-f(0)}{x-0} - 1right) = 0implies displaystyle lim_{x to 0} dfrac{f(x) - f(0)}{x-0} = 1implies f'(0) = 1$.



    $b)$: Let $a > 0$ and consider $(-a,a)$ be a neighborhood of $0$. We might consider further that $a < dfrac{1}{2}, a in mathbb{Q}$. Observe that $dfrac{-1+sqrt{1+4a-4a^2}}{2}< aimplies $ if we take an irrational number $b in left(dfrac{-1+sqrt{1+4a-4a^2}}{2}, aright)$ then $b+b^2 > a-a^2implies f(b) > f(a)$. Next we choose a rational number $d in (0, b)implies d < b implies d-d^2 < b < b+b^2 implies d-d^2 < b+b^2implies f(d) < f(b)$. Thus we have: $d < b < a $ and $f(d) < f(b) > f(a)$, proving $f$ is not monotonically increasing.






    share|cite|improve this answer











    $endgroup$



    $a)$: We can rewrite $f(x) - x = left { begin {array} {c} -x^2 & text{ if } x in mathbb{Q}\
    x^2 & text{ if } x notin mathbb{Q}. end{array}\
    right.$
    . Thus $displaystyle lim_{x to 0} left|dfrac{f(x) - f(0)}{x-0} - 1right|= displaystyle lim_{x to 0} left|dfrac{f(x)-x}{x}right|= displaystyle lim_{x to 0} left|dfrac{x^2}{x}right|= displaystyle lim_{x to 0} |x| = 0implies displaystyle lim_{x to 0} left(dfrac{f(x)-f(0)}{x-0} - 1right) = 0implies displaystyle lim_{x to 0} dfrac{f(x) - f(0)}{x-0} = 1implies f'(0) = 1$.



    $b)$: Let $a > 0$ and consider $(-a,a)$ be a neighborhood of $0$. We might consider further that $a < dfrac{1}{2}, a in mathbb{Q}$. Observe that $dfrac{-1+sqrt{1+4a-4a^2}}{2}< aimplies $ if we take an irrational number $b in left(dfrac{-1+sqrt{1+4a-4a^2}}{2}, aright)$ then $b+b^2 > a-a^2implies f(b) > f(a)$. Next we choose a rational number $d in (0, b)implies d < b implies d-d^2 < b < b+b^2 implies d-d^2 < b+b^2implies f(d) < f(b)$. Thus we have: $d < b < a $ and $f(d) < f(b) > f(a)$, proving $f$ is not monotonically increasing.







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited Jan 27 at 22:45

























    answered Jan 27 at 0:13









    DeepSeaDeepSea

    71.3k54488




    71.3k54488












    • $begingroup$
      any ideas for the second part?
      $endgroup$
      – dxdydz
      Jan 27 at 3:40










    • $begingroup$
      I dont understand, where did $frac{-1+sqrt{1+4a-4a^2}}{2}<a$ come from?
      $endgroup$
      – dxdydz
      Jan 28 at 16:18












    • $begingroup$
      It comes from solving for $b$ the solutions of the inequality: $b^2+b > a-a^2$ and the expression above is solution of $b$ using quadratic formula.
      $endgroup$
      – DeepSea
      Jan 28 at 21:05


















    • $begingroup$
      any ideas for the second part?
      $endgroup$
      – dxdydz
      Jan 27 at 3:40










    • $begingroup$
      I dont understand, where did $frac{-1+sqrt{1+4a-4a^2}}{2}<a$ come from?
      $endgroup$
      – dxdydz
      Jan 28 at 16:18












    • $begingroup$
      It comes from solving for $b$ the solutions of the inequality: $b^2+b > a-a^2$ and the expression above is solution of $b$ using quadratic formula.
      $endgroup$
      – DeepSea
      Jan 28 at 21:05
















    $begingroup$
    any ideas for the second part?
    $endgroup$
    – dxdydz
    Jan 27 at 3:40




    $begingroup$
    any ideas for the second part?
    $endgroup$
    – dxdydz
    Jan 27 at 3:40












    $begingroup$
    I dont understand, where did $frac{-1+sqrt{1+4a-4a^2}}{2}<a$ come from?
    $endgroup$
    – dxdydz
    Jan 28 at 16:18






    $begingroup$
    I dont understand, where did $frac{-1+sqrt{1+4a-4a^2}}{2}<a$ come from?
    $endgroup$
    – dxdydz
    Jan 28 at 16:18














    $begingroup$
    It comes from solving for $b$ the solutions of the inequality: $b^2+b > a-a^2$ and the expression above is solution of $b$ using quadratic formula.
    $endgroup$
    – DeepSea
    Jan 28 at 21:05




    $begingroup$
    It comes from solving for $b$ the solutions of the inequality: $b^2+b > a-a^2$ and the expression above is solution of $b$ using quadratic formula.
    $endgroup$
    – DeepSea
    Jan 28 at 21:05











    0












    $begingroup$

    Keep in mind that a function can only be differentiable where it is continuous (and not always there, either).



    The density of the rationals and irrationals in the reals means that this piecewise function will only be continuous (and, therefore, may only be differentiable) where the two definitional formulas agree. That is, for $f$ to be continuous, we require that $$x-x^2=x+x^2\0=2x^2\0=x^2\0=x.$$



    Now, to prove that $f'(0)$ even exists, we have to show that $$lim_{xto 0}frac{x-x^2-f(0)}{x-0}=lim_{xto 0}frac{x+x^2-f(0)}{x-0},$$ but this is easily seen, since $f(0)=0,$ so that we need only show that $$lim_{xto 0}frac{x-x^2}{x}=lim_{xto 0}frac{x+x^2}{x},$$ or (equivalently) that $$lim_{xto 0}1-x=lim_{xto 0}1+x.$$ I leave it to you to show that both limits exist, and that both are equal to $1,$ so that $f'(0)=1.$



    On the other hand, given any $x_0neq 0,$ we can readily show that $$lim_{xto x_0}frac{x-x^2}{x}neqlim_{xto x_0}frac{x+x^2}{x},$$ so that $f'$ is defined only at $x=0.$



    What your book leaves out (apparently) is that the neighborhood of the point must be a relative neighborhood of the function's domain. In this case, this means that there must be some (more general) neighborhood (say $U$) of the point $0$ such that, for all $xinoperatorname{dom}(f')cap U,$ we have that $f(x)>0.$ But this is trivially true, regardless of the neighborhood $U$ we choose, since $f'$ is defined only at $x=0,$ so that $operatorname{dom}(f')cap U={0},$ whence $f'$ is positive in a relative neighborhood of $x=0,$ as desired.






    share|cite|improve this answer









    $endgroup$


















      0












      $begingroup$

      Keep in mind that a function can only be differentiable where it is continuous (and not always there, either).



      The density of the rationals and irrationals in the reals means that this piecewise function will only be continuous (and, therefore, may only be differentiable) where the two definitional formulas agree. That is, for $f$ to be continuous, we require that $$x-x^2=x+x^2\0=2x^2\0=x^2\0=x.$$



      Now, to prove that $f'(0)$ even exists, we have to show that $$lim_{xto 0}frac{x-x^2-f(0)}{x-0}=lim_{xto 0}frac{x+x^2-f(0)}{x-0},$$ but this is easily seen, since $f(0)=0,$ so that we need only show that $$lim_{xto 0}frac{x-x^2}{x}=lim_{xto 0}frac{x+x^2}{x},$$ or (equivalently) that $$lim_{xto 0}1-x=lim_{xto 0}1+x.$$ I leave it to you to show that both limits exist, and that both are equal to $1,$ so that $f'(0)=1.$



      On the other hand, given any $x_0neq 0,$ we can readily show that $$lim_{xto x_0}frac{x-x^2}{x}neqlim_{xto x_0}frac{x+x^2}{x},$$ so that $f'$ is defined only at $x=0.$



      What your book leaves out (apparently) is that the neighborhood of the point must be a relative neighborhood of the function's domain. In this case, this means that there must be some (more general) neighborhood (say $U$) of the point $0$ such that, for all $xinoperatorname{dom}(f')cap U,$ we have that $f(x)>0.$ But this is trivially true, regardless of the neighborhood $U$ we choose, since $f'$ is defined only at $x=0,$ so that $operatorname{dom}(f')cap U={0},$ whence $f'$ is positive in a relative neighborhood of $x=0,$ as desired.






      share|cite|improve this answer









      $endgroup$
















        0












        0








        0





        $begingroup$

        Keep in mind that a function can only be differentiable where it is continuous (and not always there, either).



        The density of the rationals and irrationals in the reals means that this piecewise function will only be continuous (and, therefore, may only be differentiable) where the two definitional formulas agree. That is, for $f$ to be continuous, we require that $$x-x^2=x+x^2\0=2x^2\0=x^2\0=x.$$



        Now, to prove that $f'(0)$ even exists, we have to show that $$lim_{xto 0}frac{x-x^2-f(0)}{x-0}=lim_{xto 0}frac{x+x^2-f(0)}{x-0},$$ but this is easily seen, since $f(0)=0,$ so that we need only show that $$lim_{xto 0}frac{x-x^2}{x}=lim_{xto 0}frac{x+x^2}{x},$$ or (equivalently) that $$lim_{xto 0}1-x=lim_{xto 0}1+x.$$ I leave it to you to show that both limits exist, and that both are equal to $1,$ so that $f'(0)=1.$



        On the other hand, given any $x_0neq 0,$ we can readily show that $$lim_{xto x_0}frac{x-x^2}{x}neqlim_{xto x_0}frac{x+x^2}{x},$$ so that $f'$ is defined only at $x=0.$



        What your book leaves out (apparently) is that the neighborhood of the point must be a relative neighborhood of the function's domain. In this case, this means that there must be some (more general) neighborhood (say $U$) of the point $0$ such that, for all $xinoperatorname{dom}(f')cap U,$ we have that $f(x)>0.$ But this is trivially true, regardless of the neighborhood $U$ we choose, since $f'$ is defined only at $x=0,$ so that $operatorname{dom}(f')cap U={0},$ whence $f'$ is positive in a relative neighborhood of $x=0,$ as desired.






        share|cite|improve this answer









        $endgroup$



        Keep in mind that a function can only be differentiable where it is continuous (and not always there, either).



        The density of the rationals and irrationals in the reals means that this piecewise function will only be continuous (and, therefore, may only be differentiable) where the two definitional formulas agree. That is, for $f$ to be continuous, we require that $$x-x^2=x+x^2\0=2x^2\0=x^2\0=x.$$



        Now, to prove that $f'(0)$ even exists, we have to show that $$lim_{xto 0}frac{x-x^2-f(0)}{x-0}=lim_{xto 0}frac{x+x^2-f(0)}{x-0},$$ but this is easily seen, since $f(0)=0,$ so that we need only show that $$lim_{xto 0}frac{x-x^2}{x}=lim_{xto 0}frac{x+x^2}{x},$$ or (equivalently) that $$lim_{xto 0}1-x=lim_{xto 0}1+x.$$ I leave it to you to show that both limits exist, and that both are equal to $1,$ so that $f'(0)=1.$



        On the other hand, given any $x_0neq 0,$ we can readily show that $$lim_{xto x_0}frac{x-x^2}{x}neqlim_{xto x_0}frac{x+x^2}{x},$$ so that $f'$ is defined only at $x=0.$



        What your book leaves out (apparently) is that the neighborhood of the point must be a relative neighborhood of the function's domain. In this case, this means that there must be some (more general) neighborhood (say $U$) of the point $0$ such that, for all $xinoperatorname{dom}(f')cap U,$ we have that $f(x)>0.$ But this is trivially true, regardless of the neighborhood $U$ we choose, since $f'$ is defined only at $x=0,$ so that $operatorname{dom}(f')cap U={0},$ whence $f'$ is positive in a relative neighborhood of $x=0,$ as desired.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Jan 26 at 23:59









        Cameron BuieCameron Buie

        86k772161




        86k772161






























            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%2f3088914%2fif-function-is-positive-and-continuous-at-a-point-then-it-is-positive-in-a-neig%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

            'app-layout' is not a known element: how to share Component with different Modules

            android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

            WPF add header to Image with URL pettitions [duplicate]