Integrating $intfrac1{x(x+2)}dx$ and $intfrac1{e^x+2}dx$. What am I doing wrong?











up vote
2
down vote

favorite












I have the following 2 questions to integrate as part of my practice.



(i) $displaystyle intfrac1{x(x+2)}dx$



(ii) $displaystyle intfrac1{e^x+2}dx$



and I have tried it myself but I am not getting the answer required



(i) $displaystyle frac12ln x-frac12ln(x+2)+C$



(ii) $displaystyle frac12x-frac12ln(e^x+2)+C$



Below are my workings



(i) $displaystyle intfrac1{x(x+2)}dx;=;intfrac1{x^2+2x}dx;=;frac{ln(x^2+2x)}{2x+2} +C$



(ii) $displaystyle intfrac1{e^x+2}dx;=frac{ln(e^x+2)}{e^x} +C$



May I know what am I doing wrong such that my answer differs?










share|cite|improve this question




















  • 4




    Take the derivatives of the functions you got, what do you get? It should make you realize your error
    – Sorfosh
    Dec 2 at 5:56










  • I didnt get back to the equation I want, but I don't understand why am I doing it wrong @Sorfosh
    – deviljones
    Dec 2 at 6:00

















up vote
2
down vote

favorite












I have the following 2 questions to integrate as part of my practice.



(i) $displaystyle intfrac1{x(x+2)}dx$



(ii) $displaystyle intfrac1{e^x+2}dx$



and I have tried it myself but I am not getting the answer required



(i) $displaystyle frac12ln x-frac12ln(x+2)+C$



(ii) $displaystyle frac12x-frac12ln(e^x+2)+C$



Below are my workings



(i) $displaystyle intfrac1{x(x+2)}dx;=;intfrac1{x^2+2x}dx;=;frac{ln(x^2+2x)}{2x+2} +C$



(ii) $displaystyle intfrac1{e^x+2}dx;=frac{ln(e^x+2)}{e^x} +C$



May I know what am I doing wrong such that my answer differs?










share|cite|improve this question




















  • 4




    Take the derivatives of the functions you got, what do you get? It should make you realize your error
    – Sorfosh
    Dec 2 at 5:56










  • I didnt get back to the equation I want, but I don't understand why am I doing it wrong @Sorfosh
    – deviljones
    Dec 2 at 6:00















up vote
2
down vote

favorite









up vote
2
down vote

favorite











I have the following 2 questions to integrate as part of my practice.



(i) $displaystyle intfrac1{x(x+2)}dx$



(ii) $displaystyle intfrac1{e^x+2}dx$



and I have tried it myself but I am not getting the answer required



(i) $displaystyle frac12ln x-frac12ln(x+2)+C$



(ii) $displaystyle frac12x-frac12ln(e^x+2)+C$



Below are my workings



(i) $displaystyle intfrac1{x(x+2)}dx;=;intfrac1{x^2+2x}dx;=;frac{ln(x^2+2x)}{2x+2} +C$



(ii) $displaystyle intfrac1{e^x+2}dx;=frac{ln(e^x+2)}{e^x} +C$



May I know what am I doing wrong such that my answer differs?










share|cite|improve this question















I have the following 2 questions to integrate as part of my practice.



(i) $displaystyle intfrac1{x(x+2)}dx$



(ii) $displaystyle intfrac1{e^x+2}dx$



and I have tried it myself but I am not getting the answer required



(i) $displaystyle frac12ln x-frac12ln(x+2)+C$



(ii) $displaystyle frac12x-frac12ln(e^x+2)+C$



Below are my workings



(i) $displaystyle intfrac1{x(x+2)}dx;=;intfrac1{x^2+2x}dx;=;frac{ln(x^2+2x)}{2x+2} +C$



(ii) $displaystyle intfrac1{e^x+2}dx;=frac{ln(e^x+2)}{e^x} +C$



May I know what am I doing wrong such that my answer differs?







calculus integration indefinite-integrals






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 2 at 5:53









Blue

47.1k870148




47.1k870148










asked Dec 2 at 5:49









deviljones

636




636








  • 4




    Take the derivatives of the functions you got, what do you get? It should make you realize your error
    – Sorfosh
    Dec 2 at 5:56










  • I didnt get back to the equation I want, but I don't understand why am I doing it wrong @Sorfosh
    – deviljones
    Dec 2 at 6:00
















  • 4




    Take the derivatives of the functions you got, what do you get? It should make you realize your error
    – Sorfosh
    Dec 2 at 5:56










  • I didnt get back to the equation I want, but I don't understand why am I doing it wrong @Sorfosh
    – deviljones
    Dec 2 at 6:00










4




4




Take the derivatives of the functions you got, what do you get? It should make you realize your error
– Sorfosh
Dec 2 at 5:56




Take the derivatives of the functions you got, what do you get? It should make you realize your error
– Sorfosh
Dec 2 at 5:56












I didnt get back to the equation I want, but I don't understand why am I doing it wrong @Sorfosh
– deviljones
Dec 2 at 6:00






I didnt get back to the equation I want, but I don't understand why am I doing it wrong @Sorfosh
– deviljones
Dec 2 at 6:00












3 Answers
3






active

oldest

votes

















up vote
1
down vote



accepted










For i):



With the constant rule 'trick', what you are effectively doing is:
$$int frac{1}{x^2+2x} dx$$



When $u = x^2+2x, du = 2x+2 dx, dx = frac{du}{2x+2}$, we have:



$$int frac{1}{u(2x+2)} du, $$



and since you cannot get the $2x+2$ part to be in terms of $u$, this 'trick' does not work.



What you can do is to use partial fractions:
$$frac{A}{x} + frac{B}{x+2} = frac{1}{x(x+2)}$$
$$A(x+2) + Bx = 1 tag{1}label{eq1}$$
$$(A+B)x + 2A = 1 tag{2}label{eq2}$$



This is an identity – it will hold for any $x$. So when $x = 0, A = frac{1}{2}$ from equation $2$, and when $x = -2$, $B = -frac{1}{2}$ from equation $1$.



Can you integrate it now?






share|cite|improve this answer





















  • yup,, thanks man
    – deviljones
    Dec 2 at 6:28










  • @deviljones No problem!
    – Toby Mak
    Dec 2 at 7:07


















up vote
3
down vote













For i) use partial fractions; note that $$frac{1}{x(x+2)}=frac{frac 12}{x} -frac{frac12}{x+2}$$ So your integral becomes:
$$int{frac{1}{x(x+2)}dx}=frac12bigg[int frac 1x dx-int frac{1}{x+2}dxbigg]$$



For the second, substitute $$u=e^xto dx = frac{du}{u}$$



Then your integral becomes:



$$intfrac{1}{e^x+2}dx=int{frac{1}{u(u+2)}du}$$ which we just solved in i)






share|cite|improve this answer



















  • 1




    You're missing a $dx$ in the last line.
    – Toby Mak
    Dec 2 at 7:06










  • Whoops. Thanks.
    – Rhys Hughes
    Dec 2 at 18:53


















up vote
0
down vote













The substitution rule is $$int f(g(x)) , g'(x) ,{rm d}x = int f(u) ,{rm d}u.$$ In particular, when $f(x) = 1/x$, $$int frac{g'(x)}{g(x)},{rm d}x = int frac{{rm d}u}{u} = log u + C = log(g(x)) + C.$$



What you are trying to do is to "dividing both sides by the derivative of $g$": $$int frac{1}{g(x)},{rm d}x = frac{log(g(x))}{g'(x)} + C. tag{OP's wrong method}$$ As the first comment suggests, differentiating both sides with respect to $x$ allows you to see the error.






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: 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%2f3022297%2fintegrating-int-frac1xx2dx-and-int-frac1ex2dx-what-am-i-doing-wr%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    For i):



    With the constant rule 'trick', what you are effectively doing is:
    $$int frac{1}{x^2+2x} dx$$



    When $u = x^2+2x, du = 2x+2 dx, dx = frac{du}{2x+2}$, we have:



    $$int frac{1}{u(2x+2)} du, $$



    and since you cannot get the $2x+2$ part to be in terms of $u$, this 'trick' does not work.



    What you can do is to use partial fractions:
    $$frac{A}{x} + frac{B}{x+2} = frac{1}{x(x+2)}$$
    $$A(x+2) + Bx = 1 tag{1}label{eq1}$$
    $$(A+B)x + 2A = 1 tag{2}label{eq2}$$



    This is an identity – it will hold for any $x$. So when $x = 0, A = frac{1}{2}$ from equation $2$, and when $x = -2$, $B = -frac{1}{2}$ from equation $1$.



    Can you integrate it now?






    share|cite|improve this answer





















    • yup,, thanks man
      – deviljones
      Dec 2 at 6:28










    • @deviljones No problem!
      – Toby Mak
      Dec 2 at 7:07















    up vote
    1
    down vote



    accepted










    For i):



    With the constant rule 'trick', what you are effectively doing is:
    $$int frac{1}{x^2+2x} dx$$



    When $u = x^2+2x, du = 2x+2 dx, dx = frac{du}{2x+2}$, we have:



    $$int frac{1}{u(2x+2)} du, $$



    and since you cannot get the $2x+2$ part to be in terms of $u$, this 'trick' does not work.



    What you can do is to use partial fractions:
    $$frac{A}{x} + frac{B}{x+2} = frac{1}{x(x+2)}$$
    $$A(x+2) + Bx = 1 tag{1}label{eq1}$$
    $$(A+B)x + 2A = 1 tag{2}label{eq2}$$



    This is an identity – it will hold for any $x$. So when $x = 0, A = frac{1}{2}$ from equation $2$, and when $x = -2$, $B = -frac{1}{2}$ from equation $1$.



    Can you integrate it now?






    share|cite|improve this answer





















    • yup,, thanks man
      – deviljones
      Dec 2 at 6:28










    • @deviljones No problem!
      – Toby Mak
      Dec 2 at 7:07













    up vote
    1
    down vote



    accepted







    up vote
    1
    down vote



    accepted






    For i):



    With the constant rule 'trick', what you are effectively doing is:
    $$int frac{1}{x^2+2x} dx$$



    When $u = x^2+2x, du = 2x+2 dx, dx = frac{du}{2x+2}$, we have:



    $$int frac{1}{u(2x+2)} du, $$



    and since you cannot get the $2x+2$ part to be in terms of $u$, this 'trick' does not work.



    What you can do is to use partial fractions:
    $$frac{A}{x} + frac{B}{x+2} = frac{1}{x(x+2)}$$
    $$A(x+2) + Bx = 1 tag{1}label{eq1}$$
    $$(A+B)x + 2A = 1 tag{2}label{eq2}$$



    This is an identity – it will hold for any $x$. So when $x = 0, A = frac{1}{2}$ from equation $2$, and when $x = -2$, $B = -frac{1}{2}$ from equation $1$.



    Can you integrate it now?






    share|cite|improve this answer












    For i):



    With the constant rule 'trick', what you are effectively doing is:
    $$int frac{1}{x^2+2x} dx$$



    When $u = x^2+2x, du = 2x+2 dx, dx = frac{du}{2x+2}$, we have:



    $$int frac{1}{u(2x+2)} du, $$



    and since you cannot get the $2x+2$ part to be in terms of $u$, this 'trick' does not work.



    What you can do is to use partial fractions:
    $$frac{A}{x} + frac{B}{x+2} = frac{1}{x(x+2)}$$
    $$A(x+2) + Bx = 1 tag{1}label{eq1}$$
    $$(A+B)x + 2A = 1 tag{2}label{eq2}$$



    This is an identity – it will hold for any $x$. So when $x = 0, A = frac{1}{2}$ from equation $2$, and when $x = -2$, $B = -frac{1}{2}$ from equation $1$.



    Can you integrate it now?







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Dec 2 at 6:09









    Toby Mak

    3,32811128




    3,32811128












    • yup,, thanks man
      – deviljones
      Dec 2 at 6:28










    • @deviljones No problem!
      – Toby Mak
      Dec 2 at 7:07


















    • yup,, thanks man
      – deviljones
      Dec 2 at 6:28










    • @deviljones No problem!
      – Toby Mak
      Dec 2 at 7:07
















    yup,, thanks man
    – deviljones
    Dec 2 at 6:28




    yup,, thanks man
    – deviljones
    Dec 2 at 6:28












    @deviljones No problem!
    – Toby Mak
    Dec 2 at 7:07




    @deviljones No problem!
    – Toby Mak
    Dec 2 at 7:07










    up vote
    3
    down vote













    For i) use partial fractions; note that $$frac{1}{x(x+2)}=frac{frac 12}{x} -frac{frac12}{x+2}$$ So your integral becomes:
    $$int{frac{1}{x(x+2)}dx}=frac12bigg[int frac 1x dx-int frac{1}{x+2}dxbigg]$$



    For the second, substitute $$u=e^xto dx = frac{du}{u}$$



    Then your integral becomes:



    $$intfrac{1}{e^x+2}dx=int{frac{1}{u(u+2)}du}$$ which we just solved in i)






    share|cite|improve this answer



















    • 1




      You're missing a $dx$ in the last line.
      – Toby Mak
      Dec 2 at 7:06










    • Whoops. Thanks.
      – Rhys Hughes
      Dec 2 at 18:53















    up vote
    3
    down vote













    For i) use partial fractions; note that $$frac{1}{x(x+2)}=frac{frac 12}{x} -frac{frac12}{x+2}$$ So your integral becomes:
    $$int{frac{1}{x(x+2)}dx}=frac12bigg[int frac 1x dx-int frac{1}{x+2}dxbigg]$$



    For the second, substitute $$u=e^xto dx = frac{du}{u}$$



    Then your integral becomes:



    $$intfrac{1}{e^x+2}dx=int{frac{1}{u(u+2)}du}$$ which we just solved in i)






    share|cite|improve this answer



















    • 1




      You're missing a $dx$ in the last line.
      – Toby Mak
      Dec 2 at 7:06










    • Whoops. Thanks.
      – Rhys Hughes
      Dec 2 at 18:53













    up vote
    3
    down vote










    up vote
    3
    down vote









    For i) use partial fractions; note that $$frac{1}{x(x+2)}=frac{frac 12}{x} -frac{frac12}{x+2}$$ So your integral becomes:
    $$int{frac{1}{x(x+2)}dx}=frac12bigg[int frac 1x dx-int frac{1}{x+2}dxbigg]$$



    For the second, substitute $$u=e^xto dx = frac{du}{u}$$



    Then your integral becomes:



    $$intfrac{1}{e^x+2}dx=int{frac{1}{u(u+2)}du}$$ which we just solved in i)






    share|cite|improve this answer














    For i) use partial fractions; note that $$frac{1}{x(x+2)}=frac{frac 12}{x} -frac{frac12}{x+2}$$ So your integral becomes:
    $$int{frac{1}{x(x+2)}dx}=frac12bigg[int frac 1x dx-int frac{1}{x+2}dxbigg]$$



    For the second, substitute $$u=e^xto dx = frac{du}{u}$$



    Then your integral becomes:



    $$intfrac{1}{e^x+2}dx=int{frac{1}{u(u+2)}du}$$ which we just solved in i)







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited Dec 2 at 18:52

























    answered Dec 2 at 6:31









    Rhys Hughes

    4,6051327




    4,6051327








    • 1




      You're missing a $dx$ in the last line.
      – Toby Mak
      Dec 2 at 7:06










    • Whoops. Thanks.
      – Rhys Hughes
      Dec 2 at 18:53














    • 1




      You're missing a $dx$ in the last line.
      – Toby Mak
      Dec 2 at 7:06










    • Whoops. Thanks.
      – Rhys Hughes
      Dec 2 at 18:53








    1




    1




    You're missing a $dx$ in the last line.
    – Toby Mak
    Dec 2 at 7:06




    You're missing a $dx$ in the last line.
    – Toby Mak
    Dec 2 at 7:06












    Whoops. Thanks.
    – Rhys Hughes
    Dec 2 at 18:53




    Whoops. Thanks.
    – Rhys Hughes
    Dec 2 at 18:53










    up vote
    0
    down vote













    The substitution rule is $$int f(g(x)) , g'(x) ,{rm d}x = int f(u) ,{rm d}u.$$ In particular, when $f(x) = 1/x$, $$int frac{g'(x)}{g(x)},{rm d}x = int frac{{rm d}u}{u} = log u + C = log(g(x)) + C.$$



    What you are trying to do is to "dividing both sides by the derivative of $g$": $$int frac{1}{g(x)},{rm d}x = frac{log(g(x))}{g'(x)} + C. tag{OP's wrong method}$$ As the first comment suggests, differentiating both sides with respect to $x$ allows you to see the error.






    share|cite|improve this answer

























      up vote
      0
      down vote













      The substitution rule is $$int f(g(x)) , g'(x) ,{rm d}x = int f(u) ,{rm d}u.$$ In particular, when $f(x) = 1/x$, $$int frac{g'(x)}{g(x)},{rm d}x = int frac{{rm d}u}{u} = log u + C = log(g(x)) + C.$$



      What you are trying to do is to "dividing both sides by the derivative of $g$": $$int frac{1}{g(x)},{rm d}x = frac{log(g(x))}{g'(x)} + C. tag{OP's wrong method}$$ As the first comment suggests, differentiating both sides with respect to $x$ allows you to see the error.






      share|cite|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        The substitution rule is $$int f(g(x)) , g'(x) ,{rm d}x = int f(u) ,{rm d}u.$$ In particular, when $f(x) = 1/x$, $$int frac{g'(x)}{g(x)},{rm d}x = int frac{{rm d}u}{u} = log u + C = log(g(x)) + C.$$



        What you are trying to do is to "dividing both sides by the derivative of $g$": $$int frac{1}{g(x)},{rm d}x = frac{log(g(x))}{g'(x)} + C. tag{OP's wrong method}$$ As the first comment suggests, differentiating both sides with respect to $x$ allows you to see the error.






        share|cite|improve this answer












        The substitution rule is $$int f(g(x)) , g'(x) ,{rm d}x = int f(u) ,{rm d}u.$$ In particular, when $f(x) = 1/x$, $$int frac{g'(x)}{g(x)},{rm d}x = int frac{{rm d}u}{u} = log u + C = log(g(x)) + C.$$



        What you are trying to do is to "dividing both sides by the derivative of $g$": $$int frac{1}{g(x)},{rm d}x = frac{log(g(x))}{g'(x)} + C. tag{OP's wrong method}$$ As the first comment suggests, differentiating both sides with respect to $x$ allows you to see the error.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Dec 2 at 6:09









        GNUSupporter 8964民主女神 地下教會

        12.6k72445




        12.6k72445






























            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%2f3022297%2fintegrating-int-frac1xx2dx-and-int-frac1ex2dx-what-am-i-doing-wr%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

            Bressuire

            Cabo Verde

            Gyllenstierna