Derivatives of function when the function is defined differently for different values of x












0












$begingroup$


If $$ f(x) := begin{cases} 0 & x = 0 \ x + x^2sin(1/x) & x neq 0 end{cases} $$ then by the definition of derivative I get $f'(0) = 1$, and if I differentiate $x + x^2sin(1/x)$ and then plug in $0$ I also get $f'(0) = 1$, but I don't know why I can plug in $0$ here since isn't $f(x)=x + x^2sin(1/x)$ only when $xneq0$?



And I'm also wondering since $f(x)=0$ when $x=0$ why can't we just differentiate this function and say $f'(0) = 0$.



Another question I have is that if $$ f'(x) := begin{cases} x^3 & xgeq 0 \ -x^3 & x < 0 end{cases} $$ why do we have to consider $x=0$ to be a separate case when trying to find the derivatives (for $x=0$ we have to use the definition of derivative to show $f'(0) = 0$ but for $xneq0$ we can just differentiate it directly)?










share|cite|improve this question











$endgroup$








  • 3




    $begingroup$
    The derivative $f'(x)=1+2xsin(1/x)-cos(1/x)$. How did you plug in $0$ to get $f'(0)=1$?
    $endgroup$
    – Shubham Johri
    Dec 16 '18 at 7:33












  • $begingroup$
    For the differentiability at $x=0$ you may use in both cases that if $g$ is a bounded function, defined on a neighbourhood of $0$, then $f(x)=x^2g(x)$ is differentiable in $x=0$: in the first case take $g(x)=sin(1/x)$, in the second one $g(x)=|x|$.
    $endgroup$
    – Michael Hoppe
    Dec 16 '18 at 12:12


















0












$begingroup$


If $$ f(x) := begin{cases} 0 & x = 0 \ x + x^2sin(1/x) & x neq 0 end{cases} $$ then by the definition of derivative I get $f'(0) = 1$, and if I differentiate $x + x^2sin(1/x)$ and then plug in $0$ I also get $f'(0) = 1$, but I don't know why I can plug in $0$ here since isn't $f(x)=x + x^2sin(1/x)$ only when $xneq0$?



And I'm also wondering since $f(x)=0$ when $x=0$ why can't we just differentiate this function and say $f'(0) = 0$.



Another question I have is that if $$ f'(x) := begin{cases} x^3 & xgeq 0 \ -x^3 & x < 0 end{cases} $$ why do we have to consider $x=0$ to be a separate case when trying to find the derivatives (for $x=0$ we have to use the definition of derivative to show $f'(0) = 0$ but for $xneq0$ we can just differentiate it directly)?










share|cite|improve this question











$endgroup$








  • 3




    $begingroup$
    The derivative $f'(x)=1+2xsin(1/x)-cos(1/x)$. How did you plug in $0$ to get $f'(0)=1$?
    $endgroup$
    – Shubham Johri
    Dec 16 '18 at 7:33












  • $begingroup$
    For the differentiability at $x=0$ you may use in both cases that if $g$ is a bounded function, defined on a neighbourhood of $0$, then $f(x)=x^2g(x)$ is differentiable in $x=0$: in the first case take $g(x)=sin(1/x)$, in the second one $g(x)=|x|$.
    $endgroup$
    – Michael Hoppe
    Dec 16 '18 at 12:12
















0












0








0





$begingroup$


If $$ f(x) := begin{cases} 0 & x = 0 \ x + x^2sin(1/x) & x neq 0 end{cases} $$ then by the definition of derivative I get $f'(0) = 1$, and if I differentiate $x + x^2sin(1/x)$ and then plug in $0$ I also get $f'(0) = 1$, but I don't know why I can plug in $0$ here since isn't $f(x)=x + x^2sin(1/x)$ only when $xneq0$?



And I'm also wondering since $f(x)=0$ when $x=0$ why can't we just differentiate this function and say $f'(0) = 0$.



Another question I have is that if $$ f'(x) := begin{cases} x^3 & xgeq 0 \ -x^3 & x < 0 end{cases} $$ why do we have to consider $x=0$ to be a separate case when trying to find the derivatives (for $x=0$ we have to use the definition of derivative to show $f'(0) = 0$ but for $xneq0$ we can just differentiate it directly)?










share|cite|improve this question











$endgroup$




If $$ f(x) := begin{cases} 0 & x = 0 \ x + x^2sin(1/x) & x neq 0 end{cases} $$ then by the definition of derivative I get $f'(0) = 1$, and if I differentiate $x + x^2sin(1/x)$ and then plug in $0$ I also get $f'(0) = 1$, but I don't know why I can plug in $0$ here since isn't $f(x)=x + x^2sin(1/x)$ only when $xneq0$?



And I'm also wondering since $f(x)=0$ when $x=0$ why can't we just differentiate this function and say $f'(0) = 0$.



Another question I have is that if $$ f'(x) := begin{cases} x^3 & xgeq 0 \ -x^3 & x < 0 end{cases} $$ why do we have to consider $x=0$ to be a separate case when trying to find the derivatives (for $x=0$ we have to use the definition of derivative to show $f'(0) = 0$ but for $xneq0$ we can just differentiate it directly)?







real-analysis calculus functions derivatives definition






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 16 '18 at 7:45









Robert Z

100k1069140




100k1069140










asked Dec 16 '18 at 7:30









bt203bt203

114




114








  • 3




    $begingroup$
    The derivative $f'(x)=1+2xsin(1/x)-cos(1/x)$. How did you plug in $0$ to get $f'(0)=1$?
    $endgroup$
    – Shubham Johri
    Dec 16 '18 at 7:33












  • $begingroup$
    For the differentiability at $x=0$ you may use in both cases that if $g$ is a bounded function, defined on a neighbourhood of $0$, then $f(x)=x^2g(x)$ is differentiable in $x=0$: in the first case take $g(x)=sin(1/x)$, in the second one $g(x)=|x|$.
    $endgroup$
    – Michael Hoppe
    Dec 16 '18 at 12:12
















  • 3




    $begingroup$
    The derivative $f'(x)=1+2xsin(1/x)-cos(1/x)$. How did you plug in $0$ to get $f'(0)=1$?
    $endgroup$
    – Shubham Johri
    Dec 16 '18 at 7:33












  • $begingroup$
    For the differentiability at $x=0$ you may use in both cases that if $g$ is a bounded function, defined on a neighbourhood of $0$, then $f(x)=x^2g(x)$ is differentiable in $x=0$: in the first case take $g(x)=sin(1/x)$, in the second one $g(x)=|x|$.
    $endgroup$
    – Michael Hoppe
    Dec 16 '18 at 12:12










3




3




$begingroup$
The derivative $f'(x)=1+2xsin(1/x)-cos(1/x)$. How did you plug in $0$ to get $f'(0)=1$?
$endgroup$
– Shubham Johri
Dec 16 '18 at 7:33






$begingroup$
The derivative $f'(x)=1+2xsin(1/x)-cos(1/x)$. How did you plug in $0$ to get $f'(0)=1$?
$endgroup$
– Shubham Johri
Dec 16 '18 at 7:33














$begingroup$
For the differentiability at $x=0$ you may use in both cases that if $g$ is a bounded function, defined on a neighbourhood of $0$, then $f(x)=x^2g(x)$ is differentiable in $x=0$: in the first case take $g(x)=sin(1/x)$, in the second one $g(x)=|x|$.
$endgroup$
– Michael Hoppe
Dec 16 '18 at 12:12






$begingroup$
For the differentiability at $x=0$ you may use in both cases that if $g$ is a bounded function, defined on a neighbourhood of $0$, then $f(x)=x^2g(x)$ is differentiable in $x=0$: in the first case take $g(x)=sin(1/x)$, in the second one $g(x)=|x|$.
$endgroup$
– Michael Hoppe
Dec 16 '18 at 12:12












1 Answer
1






active

oldest

votes


















1












$begingroup$

First of all, since $f'(x)=1+2xsinleft(frac1xright)-cosleft(frac1xright)$, you simply cannot plug in $0$.



Concerning the second question, suppose that you define$$begin{array}{rccc}gcolon&mathbb R&longrightarrow&mathbb R\&x&mapsto&begin{cases}x&text{ if }xneq0\0&text{ if }x=0.end{cases}end{array}$$If the method that you suggested worked, we would have $g'(0)$. But $g$ is the identity function (that is, $g(x)=x$ for each $x$) and therefore $g'(0)=1$).



FInally, my answer to the second question also answers the third one.






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%2f3042337%2fderivatives-of-function-when-the-function-is-defined-differently-for-different-v%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    First of all, since $f'(x)=1+2xsinleft(frac1xright)-cosleft(frac1xright)$, you simply cannot plug in $0$.



    Concerning the second question, suppose that you define$$begin{array}{rccc}gcolon&mathbb R&longrightarrow&mathbb R\&x&mapsto&begin{cases}x&text{ if }xneq0\0&text{ if }x=0.end{cases}end{array}$$If the method that you suggested worked, we would have $g'(0)$. But $g$ is the identity function (that is, $g(x)=x$ for each $x$) and therefore $g'(0)=1$).



    FInally, my answer to the second question also answers the third one.






    share|cite|improve this answer









    $endgroup$


















      1












      $begingroup$

      First of all, since $f'(x)=1+2xsinleft(frac1xright)-cosleft(frac1xright)$, you simply cannot plug in $0$.



      Concerning the second question, suppose that you define$$begin{array}{rccc}gcolon&mathbb R&longrightarrow&mathbb R\&x&mapsto&begin{cases}x&text{ if }xneq0\0&text{ if }x=0.end{cases}end{array}$$If the method that you suggested worked, we would have $g'(0)$. But $g$ is the identity function (that is, $g(x)=x$ for each $x$) and therefore $g'(0)=1$).



      FInally, my answer to the second question also answers the third one.






      share|cite|improve this answer









      $endgroup$
















        1












        1








        1





        $begingroup$

        First of all, since $f'(x)=1+2xsinleft(frac1xright)-cosleft(frac1xright)$, you simply cannot plug in $0$.



        Concerning the second question, suppose that you define$$begin{array}{rccc}gcolon&mathbb R&longrightarrow&mathbb R\&x&mapsto&begin{cases}x&text{ if }xneq0\0&text{ if }x=0.end{cases}end{array}$$If the method that you suggested worked, we would have $g'(0)$. But $g$ is the identity function (that is, $g(x)=x$ for each $x$) and therefore $g'(0)=1$).



        FInally, my answer to the second question also answers the third one.






        share|cite|improve this answer









        $endgroup$



        First of all, since $f'(x)=1+2xsinleft(frac1xright)-cosleft(frac1xright)$, you simply cannot plug in $0$.



        Concerning the second question, suppose that you define$$begin{array}{rccc}gcolon&mathbb R&longrightarrow&mathbb R\&x&mapsto&begin{cases}x&text{ if }xneq0\0&text{ if }x=0.end{cases}end{array}$$If the method that you suggested worked, we would have $g'(0)$. But $g$ is the identity function (that is, $g(x)=x$ for each $x$) and therefore $g'(0)=1$).



        FInally, my answer to the second question also answers the third one.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Dec 16 '18 at 7:38









        José Carlos SantosJosé Carlos Santos

        166k22132235




        166k22132235






























            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%2f3042337%2fderivatives-of-function-when-the-function-is-defined-differently-for-different-v%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

            Plaza Victoria

            In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

            How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...