Using Variation of Parameters to Find the General Solution of $u''-u=frac2e^x+1$

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











up vote
0
down vote

favorite













I am trying to use variation of parameters to find the general solution to the inhomogeneous ODE
$$u''-u=frac2e^x+1$$




By computing the characteristic polynomial of the homogeneous equation $u''-u=0$, I have found $$u_H=c_1e^x+c_2e^-x c_1,c_2inmathbbR$$
Hence $u_1(x)=e^x, u_2(x)=e^-x$. So,
beginalign
v'_1(x)&=-fracu_2(x)f(x)W(x) \
v_1(x)&=int frace^-xe^x+1 dx \
&=-e^-x+ln|e^-x+1|+C_1
endalign



and similarly,
beginalign
v'_2(x)&=fracu_1(x)f(x)W(x) \
v_2(x)&=-int frace^xe^x+1 dx \
&=-ln|e^x+1|+C_2
endalign



Hence the general solution is given by
$$u(x)=v_1(x)u_1(x)+v_2(x)u_2(x)=left(-e^-x+ln|e^-x+1|+C_1right)e^x+left(-ln|e^x+1|+C_2right)e^-x$$
But this is incorret. Is my method valid?







share|cite|improve this question





















  • I have got$$u_p=-e^-xlog(e^x+1)+e^x(-e^-x+log(e^x+1))$$
    – Dr. Sonnhard Graubner
    20 hours ago











  • Indeed that is what I have determined. The solution that I have found has $$u_p=e^xln(1+e^-x)-xe^x-e^-xln(1+e^x)-1$$ which does not make much sense to me.
    – Bell
    20 hours ago











  • I think the $-xe^x$ is wrong
    – Dr. Sonnhard Graubner
    20 hours ago










  • I think so as well. I thought I might upload it to MSE as university literature (which is where the question is from) is very rarely found with mistakes. I might raise this with the lecturer. Thanks
    – Bell
    20 hours ago










  • You can tell me the result if you want.
    – Dr. Sonnhard Graubner
    20 hours ago














up vote
0
down vote

favorite













I am trying to use variation of parameters to find the general solution to the inhomogeneous ODE
$$u''-u=frac2e^x+1$$




By computing the characteristic polynomial of the homogeneous equation $u''-u=0$, I have found $$u_H=c_1e^x+c_2e^-x c_1,c_2inmathbbR$$
Hence $u_1(x)=e^x, u_2(x)=e^-x$. So,
beginalign
v'_1(x)&=-fracu_2(x)f(x)W(x) \
v_1(x)&=int frace^-xe^x+1 dx \
&=-e^-x+ln|e^-x+1|+C_1
endalign



and similarly,
beginalign
v'_2(x)&=fracu_1(x)f(x)W(x) \
v_2(x)&=-int frace^xe^x+1 dx \
&=-ln|e^x+1|+C_2
endalign



Hence the general solution is given by
$$u(x)=v_1(x)u_1(x)+v_2(x)u_2(x)=left(-e^-x+ln|e^-x+1|+C_1right)e^x+left(-ln|e^x+1|+C_2right)e^-x$$
But this is incorret. Is my method valid?







share|cite|improve this question





















  • I have got$$u_p=-e^-xlog(e^x+1)+e^x(-e^-x+log(e^x+1))$$
    – Dr. Sonnhard Graubner
    20 hours ago











  • Indeed that is what I have determined. The solution that I have found has $$u_p=e^xln(1+e^-x)-xe^x-e^-xln(1+e^x)-1$$ which does not make much sense to me.
    – Bell
    20 hours ago











  • I think the $-xe^x$ is wrong
    – Dr. Sonnhard Graubner
    20 hours ago










  • I think so as well. I thought I might upload it to MSE as university literature (which is where the question is from) is very rarely found with mistakes. I might raise this with the lecturer. Thanks
    – Bell
    20 hours ago










  • You can tell me the result if you want.
    – Dr. Sonnhard Graubner
    20 hours ago












up vote
0
down vote

favorite









up vote
0
down vote

favorite












I am trying to use variation of parameters to find the general solution to the inhomogeneous ODE
$$u''-u=frac2e^x+1$$




By computing the characteristic polynomial of the homogeneous equation $u''-u=0$, I have found $$u_H=c_1e^x+c_2e^-x c_1,c_2inmathbbR$$
Hence $u_1(x)=e^x, u_2(x)=e^-x$. So,
beginalign
v'_1(x)&=-fracu_2(x)f(x)W(x) \
v_1(x)&=int frace^-xe^x+1 dx \
&=-e^-x+ln|e^-x+1|+C_1
endalign



and similarly,
beginalign
v'_2(x)&=fracu_1(x)f(x)W(x) \
v_2(x)&=-int frace^xe^x+1 dx \
&=-ln|e^x+1|+C_2
endalign



Hence the general solution is given by
$$u(x)=v_1(x)u_1(x)+v_2(x)u_2(x)=left(-e^-x+ln|e^-x+1|+C_1right)e^x+left(-ln|e^x+1|+C_2right)e^-x$$
But this is incorret. Is my method valid?







share|cite|improve this question














I am trying to use variation of parameters to find the general solution to the inhomogeneous ODE
$$u''-u=frac2e^x+1$$




By computing the characteristic polynomial of the homogeneous equation $u''-u=0$, I have found $$u_H=c_1e^x+c_2e^-x c_1,c_2inmathbbR$$
Hence $u_1(x)=e^x, u_2(x)=e^-x$. So,
beginalign
v'_1(x)&=-fracu_2(x)f(x)W(x) \
v_1(x)&=int frace^-xe^x+1 dx \
&=-e^-x+ln|e^-x+1|+C_1
endalign



and similarly,
beginalign
v'_2(x)&=fracu_1(x)f(x)W(x) \
v_2(x)&=-int frace^xe^x+1 dx \
&=-ln|e^x+1|+C_2
endalign



Hence the general solution is given by
$$u(x)=v_1(x)u_1(x)+v_2(x)u_2(x)=left(-e^-x+ln|e^-x+1|+C_1right)e^x+left(-ln|e^x+1|+C_2right)e^-x$$
But this is incorret. Is my method valid?









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited 20 hours ago
























asked 20 hours ago









Bell

53612




53612











  • I have got$$u_p=-e^-xlog(e^x+1)+e^x(-e^-x+log(e^x+1))$$
    – Dr. Sonnhard Graubner
    20 hours ago











  • Indeed that is what I have determined. The solution that I have found has $$u_p=e^xln(1+e^-x)-xe^x-e^-xln(1+e^x)-1$$ which does not make much sense to me.
    – Bell
    20 hours ago











  • I think the $-xe^x$ is wrong
    – Dr. Sonnhard Graubner
    20 hours ago










  • I think so as well. I thought I might upload it to MSE as university literature (which is where the question is from) is very rarely found with mistakes. I might raise this with the lecturer. Thanks
    – Bell
    20 hours ago










  • You can tell me the result if you want.
    – Dr. Sonnhard Graubner
    20 hours ago
















  • I have got$$u_p=-e^-xlog(e^x+1)+e^x(-e^-x+log(e^x+1))$$
    – Dr. Sonnhard Graubner
    20 hours ago











  • Indeed that is what I have determined. The solution that I have found has $$u_p=e^xln(1+e^-x)-xe^x-e^-xln(1+e^x)-1$$ which does not make much sense to me.
    – Bell
    20 hours ago











  • I think the $-xe^x$ is wrong
    – Dr. Sonnhard Graubner
    20 hours ago










  • I think so as well. I thought I might upload it to MSE as university literature (which is where the question is from) is very rarely found with mistakes. I might raise this with the lecturer. Thanks
    – Bell
    20 hours ago










  • You can tell me the result if you want.
    – Dr. Sonnhard Graubner
    20 hours ago















I have got$$u_p=-e^-xlog(e^x+1)+e^x(-e^-x+log(e^x+1))$$
– Dr. Sonnhard Graubner
20 hours ago





I have got$$u_p=-e^-xlog(e^x+1)+e^x(-e^-x+log(e^x+1))$$
– Dr. Sonnhard Graubner
20 hours ago













Indeed that is what I have determined. The solution that I have found has $$u_p=e^xln(1+e^-x)-xe^x-e^-xln(1+e^x)-1$$ which does not make much sense to me.
– Bell
20 hours ago





Indeed that is what I have determined. The solution that I have found has $$u_p=e^xln(1+e^-x)-xe^x-e^-xln(1+e^x)-1$$ which does not make much sense to me.
– Bell
20 hours ago













I think the $-xe^x$ is wrong
– Dr. Sonnhard Graubner
20 hours ago




I think the $-xe^x$ is wrong
– Dr. Sonnhard Graubner
20 hours ago












I think so as well. I thought I might upload it to MSE as university literature (which is where the question is from) is very rarely found with mistakes. I might raise this with the lecturer. Thanks
– Bell
20 hours ago




I think so as well. I thought I might upload it to MSE as university literature (which is where the question is from) is very rarely found with mistakes. I might raise this with the lecturer. Thanks
– Bell
20 hours ago












You can tell me the result if you want.
– Dr. Sonnhard Graubner
20 hours ago




You can tell me the result if you want.
– Dr. Sonnhard Graubner
20 hours ago










3 Answers
3






active

oldest

votes

















up vote
2
down vote













For particular solution, we can use differential operator method for $D(u''-u)=dfrac2e^x+1$ then
$$(D^2-1)u=frac2e^x+1$$
$$u=dfrac1D-1left(dfrac1D+1(frac2e^x+1)right)$$
let $v=dfrac1D+1(dfrac2e^x+1)$ then
$$e^xv'+e^xv=dfrac2e^xe^x+1$$
gives the function $v=e^-xintdfrac2e^xe^x+1dx=2e^-xln(e^x+1)$. Now
$$u=dfrac1D-1left(2e^-xln(e^x+1)right)$$
or
$$e^-xu'-e^-xu=2e^-2xln(e^x+1)$$
therefore
$$u=e^xint2e^-2xln(e^x+1)dx=colorbluee^xlnleft(e^-x+1right)-e^-xln left(e^x+1right)-1$$






share|cite|improve this answer




























    up vote
    2
    down vote













    First,
    $$W(x)=detleft(beginbmatrixexp(x)&exp(-x)\exp(x)&-exp(-x)endbmatrixright)=-2,.$$

    That is, with a proper constant of integration,
    $$beginalignv_1(x)&=-int,fracu_2(x),f(x)W(x),textdx
    \&=-exp(-x)+lnbig(1+exp(-x)big)=-exp(-x)-x+lnbig(1+exp(x)big),.endalign$$
    Likewise, for an appropriate choice of the constant of integration, we have
    $$v_2(x)=+int,fracu_1(x),f(x)W(x),textdx=-lnbig(1+exp(x)big),.$$
    Thus, a particular solution is
    $$beginalignu_p(x)&=v_1(x),u_1(x)+v_2(x),u_2(x)
    \&=smallexp(+x),Big(-exp(-x)-x+lnbig(1+exp(x)big)Big)-exp(-x),lnbig(1+exp(x)big)
    \
    &=-1-x,exp(x)+2,sinh(x),lnbig(1+exp(x)big),.endalign$$
    Hence, the general solutions are of the form
    $$u(x)=u_p(x)+a,exp(+x)+b,exp(-x),,$$
    where $a$ and $b$ are constants. My result agrees with you.




    Alternatively, note that
    $$fractextdtextdx,exp(x),big(u'(x)-u(x)big)=frac2,exp(x)exp(x)+1,.$$
    That is,
    $$u'(x)-u(x)=int,fracexp(x)exp(x)+1,textdx=2,exp(-x),lnbig(exp(x)+1big)-2A,exp(-x)$$
    for some constant $A$. That is,
    $$fractextdtextdx,exp(-x),u(x)=2,exp(-2x),lnbig(exp(x)+1big)-2A,exp(-2x),.$$
    Ergo,
    $$u(x)=exp(+x),int,2,exp(-2x),lnbig(exp(x)+1big),textdx+A,exp(-x),.$$
    Using integration by parts, we obtain
    $$int,2,exp(-2x),lnbig(exp(x)+1big),textdx=-exp(-x)-x+2exp(-x),sinh(x),lnbig(1+exp(x)big)+B$$
    for some constant $B$, and so we conclude that
    $$u(x)=-1-x,exp(x)+2,sinh(x),lnbig(1+exp(x)big)+A,exp(-x)+B,exp(+x),.$$






    share|cite|improve this answer






























      up vote
      1
      down vote













      $$u''-u=frac2e^x+1$$
      $$u''-u'+u'-u=frac2e^x+1$$
      Substitute $s=u'-u$
      $$s'+s=frac2e^x+1$$
      $$(se^x)'=frac2e^xe^x+1$$
      Integrating
      $$se^x=2ln(e^x+1)+K_1$$
      $$(u'-u)e^-x=2e^-2xln(e^x+1)+K_1e^-2x$$
      $$(ue^-x)'=2e^-2xln(e^x+1)+K_1e^-2x$$
      After integration
      $$u=2e^xint ln(e^x+1)e^-2xdx+K_1e^-x+K_2e^x$$
      $$u=-ln(e^x+1)e^-x+e^xint frac e^-xe^x+1dx+K_1e^-x+K_2e^x$$
      Finally
      $$u(x)=-ln(e^x+1)e^-x+e^xln( e^-x+1)-1+K_1e^-x+K_2e^x$$
      or
      $$u(x)=ln(e^x+1)(-e^-x+e^x)-1-xe^x+K_1e^-x+K_2e^x$$




      Edit



      I think the $−xe^x$ is wrong



      It's not wrong I think it comes from the
      $$e^xln(e^-x+1)=e^xln (e^x+1)-xe^x$$






      share|cite|improve this answer























      • I don't quite understand. Could you please explain your edit.
        – Bell
        9 hours ago










      • @Bell Is this more clear ? $$e^xln(e^-x+1)=e^xln(frac 1 e^x+1)=e^xln (e^x+1)-e^xln e^x$$
        – Isham
        8 hours ago











      • Yep, I understand. Although the general solution in the book is $$u(x)=e^xleft(C_1+ln|1+e^-x|-xright)+e^-xleft(C_2-ln|1+e^x|right)-1$$ but this does not look equivalent to both of our answers. Does this answer look correct to you?
        – Bell
        7 hours ago











      • there is a sign mistake for the exponential inside the ln fucntion No it dosent look correct to me
        – Isham
        7 hours ago






      • 1




        ok @Bell have a nice day
        – Isham
        7 hours ago










      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%2f2872900%2fusing-variation-of-parameters-to-find-the-general-solution-of-u-u-frac2e%23new-answer', 'question_page');

      );

      Post as a guest






























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      2
      down vote













      For particular solution, we can use differential operator method for $D(u''-u)=dfrac2e^x+1$ then
      $$(D^2-1)u=frac2e^x+1$$
      $$u=dfrac1D-1left(dfrac1D+1(frac2e^x+1)right)$$
      let $v=dfrac1D+1(dfrac2e^x+1)$ then
      $$e^xv'+e^xv=dfrac2e^xe^x+1$$
      gives the function $v=e^-xintdfrac2e^xe^x+1dx=2e^-xln(e^x+1)$. Now
      $$u=dfrac1D-1left(2e^-xln(e^x+1)right)$$
      or
      $$e^-xu'-e^-xu=2e^-2xln(e^x+1)$$
      therefore
      $$u=e^xint2e^-2xln(e^x+1)dx=colorbluee^xlnleft(e^-x+1right)-e^-xln left(e^x+1right)-1$$






      share|cite|improve this answer

























        up vote
        2
        down vote













        For particular solution, we can use differential operator method for $D(u''-u)=dfrac2e^x+1$ then
        $$(D^2-1)u=frac2e^x+1$$
        $$u=dfrac1D-1left(dfrac1D+1(frac2e^x+1)right)$$
        let $v=dfrac1D+1(dfrac2e^x+1)$ then
        $$e^xv'+e^xv=dfrac2e^xe^x+1$$
        gives the function $v=e^-xintdfrac2e^xe^x+1dx=2e^-xln(e^x+1)$. Now
        $$u=dfrac1D-1left(2e^-xln(e^x+1)right)$$
        or
        $$e^-xu'-e^-xu=2e^-2xln(e^x+1)$$
        therefore
        $$u=e^xint2e^-2xln(e^x+1)dx=colorbluee^xlnleft(e^-x+1right)-e^-xln left(e^x+1right)-1$$






        share|cite|improve this answer























          up vote
          2
          down vote










          up vote
          2
          down vote









          For particular solution, we can use differential operator method for $D(u''-u)=dfrac2e^x+1$ then
          $$(D^2-1)u=frac2e^x+1$$
          $$u=dfrac1D-1left(dfrac1D+1(frac2e^x+1)right)$$
          let $v=dfrac1D+1(dfrac2e^x+1)$ then
          $$e^xv'+e^xv=dfrac2e^xe^x+1$$
          gives the function $v=e^-xintdfrac2e^xe^x+1dx=2e^-xln(e^x+1)$. Now
          $$u=dfrac1D-1left(2e^-xln(e^x+1)right)$$
          or
          $$e^-xu'-e^-xu=2e^-2xln(e^x+1)$$
          therefore
          $$u=e^xint2e^-2xln(e^x+1)dx=colorbluee^xlnleft(e^-x+1right)-e^-xln left(e^x+1right)-1$$






          share|cite|improve this answer













          For particular solution, we can use differential operator method for $D(u''-u)=dfrac2e^x+1$ then
          $$(D^2-1)u=frac2e^x+1$$
          $$u=dfrac1D-1left(dfrac1D+1(frac2e^x+1)right)$$
          let $v=dfrac1D+1(dfrac2e^x+1)$ then
          $$e^xv'+e^xv=dfrac2e^xe^x+1$$
          gives the function $v=e^-xintdfrac2e^xe^x+1dx=2e^-xln(e^x+1)$. Now
          $$u=dfrac1D-1left(2e^-xln(e^x+1)right)$$
          or
          $$e^-xu'-e^-xu=2e^-2xln(e^x+1)$$
          therefore
          $$u=e^xint2e^-2xln(e^x+1)dx=colorbluee^xlnleft(e^-x+1right)-e^-xln left(e^x+1right)-1$$







          share|cite|improve this answer













          share|cite|improve this answer



          share|cite|improve this answer











          answered 19 hours ago









          user 108128

          18.6k41544




          18.6k41544




















              up vote
              2
              down vote













              First,
              $$W(x)=detleft(beginbmatrixexp(x)&exp(-x)\exp(x)&-exp(-x)endbmatrixright)=-2,.$$

              That is, with a proper constant of integration,
              $$beginalignv_1(x)&=-int,fracu_2(x),f(x)W(x),textdx
              \&=-exp(-x)+lnbig(1+exp(-x)big)=-exp(-x)-x+lnbig(1+exp(x)big),.endalign$$
              Likewise, for an appropriate choice of the constant of integration, we have
              $$v_2(x)=+int,fracu_1(x),f(x)W(x),textdx=-lnbig(1+exp(x)big),.$$
              Thus, a particular solution is
              $$beginalignu_p(x)&=v_1(x),u_1(x)+v_2(x),u_2(x)
              \&=smallexp(+x),Big(-exp(-x)-x+lnbig(1+exp(x)big)Big)-exp(-x),lnbig(1+exp(x)big)
              \
              &=-1-x,exp(x)+2,sinh(x),lnbig(1+exp(x)big),.endalign$$
              Hence, the general solutions are of the form
              $$u(x)=u_p(x)+a,exp(+x)+b,exp(-x),,$$
              where $a$ and $b$ are constants. My result agrees with you.




              Alternatively, note that
              $$fractextdtextdx,exp(x),big(u'(x)-u(x)big)=frac2,exp(x)exp(x)+1,.$$
              That is,
              $$u'(x)-u(x)=int,fracexp(x)exp(x)+1,textdx=2,exp(-x),lnbig(exp(x)+1big)-2A,exp(-x)$$
              for some constant $A$. That is,
              $$fractextdtextdx,exp(-x),u(x)=2,exp(-2x),lnbig(exp(x)+1big)-2A,exp(-2x),.$$
              Ergo,
              $$u(x)=exp(+x),int,2,exp(-2x),lnbig(exp(x)+1big),textdx+A,exp(-x),.$$
              Using integration by parts, we obtain
              $$int,2,exp(-2x),lnbig(exp(x)+1big),textdx=-exp(-x)-x+2exp(-x),sinh(x),lnbig(1+exp(x)big)+B$$
              for some constant $B$, and so we conclude that
              $$u(x)=-1-x,exp(x)+2,sinh(x),lnbig(1+exp(x)big)+A,exp(-x)+B,exp(+x),.$$






              share|cite|improve this answer



























                up vote
                2
                down vote













                First,
                $$W(x)=detleft(beginbmatrixexp(x)&exp(-x)\exp(x)&-exp(-x)endbmatrixright)=-2,.$$

                That is, with a proper constant of integration,
                $$beginalignv_1(x)&=-int,fracu_2(x),f(x)W(x),textdx
                \&=-exp(-x)+lnbig(1+exp(-x)big)=-exp(-x)-x+lnbig(1+exp(x)big),.endalign$$
                Likewise, for an appropriate choice of the constant of integration, we have
                $$v_2(x)=+int,fracu_1(x),f(x)W(x),textdx=-lnbig(1+exp(x)big),.$$
                Thus, a particular solution is
                $$beginalignu_p(x)&=v_1(x),u_1(x)+v_2(x),u_2(x)
                \&=smallexp(+x),Big(-exp(-x)-x+lnbig(1+exp(x)big)Big)-exp(-x),lnbig(1+exp(x)big)
                \
                &=-1-x,exp(x)+2,sinh(x),lnbig(1+exp(x)big),.endalign$$
                Hence, the general solutions are of the form
                $$u(x)=u_p(x)+a,exp(+x)+b,exp(-x),,$$
                where $a$ and $b$ are constants. My result agrees with you.




                Alternatively, note that
                $$fractextdtextdx,exp(x),big(u'(x)-u(x)big)=frac2,exp(x)exp(x)+1,.$$
                That is,
                $$u'(x)-u(x)=int,fracexp(x)exp(x)+1,textdx=2,exp(-x),lnbig(exp(x)+1big)-2A,exp(-x)$$
                for some constant $A$. That is,
                $$fractextdtextdx,exp(-x),u(x)=2,exp(-2x),lnbig(exp(x)+1big)-2A,exp(-2x),.$$
                Ergo,
                $$u(x)=exp(+x),int,2,exp(-2x),lnbig(exp(x)+1big),textdx+A,exp(-x),.$$
                Using integration by parts, we obtain
                $$int,2,exp(-2x),lnbig(exp(x)+1big),textdx=-exp(-x)-x+2exp(-x),sinh(x),lnbig(1+exp(x)big)+B$$
                for some constant $B$, and so we conclude that
                $$u(x)=-1-x,exp(x)+2,sinh(x),lnbig(1+exp(x)big)+A,exp(-x)+B,exp(+x),.$$






                share|cite|improve this answer

























                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  First,
                  $$W(x)=detleft(beginbmatrixexp(x)&exp(-x)\exp(x)&-exp(-x)endbmatrixright)=-2,.$$

                  That is, with a proper constant of integration,
                  $$beginalignv_1(x)&=-int,fracu_2(x),f(x)W(x),textdx
                  \&=-exp(-x)+lnbig(1+exp(-x)big)=-exp(-x)-x+lnbig(1+exp(x)big),.endalign$$
                  Likewise, for an appropriate choice of the constant of integration, we have
                  $$v_2(x)=+int,fracu_1(x),f(x)W(x),textdx=-lnbig(1+exp(x)big),.$$
                  Thus, a particular solution is
                  $$beginalignu_p(x)&=v_1(x),u_1(x)+v_2(x),u_2(x)
                  \&=smallexp(+x),Big(-exp(-x)-x+lnbig(1+exp(x)big)Big)-exp(-x),lnbig(1+exp(x)big)
                  \
                  &=-1-x,exp(x)+2,sinh(x),lnbig(1+exp(x)big),.endalign$$
                  Hence, the general solutions are of the form
                  $$u(x)=u_p(x)+a,exp(+x)+b,exp(-x),,$$
                  where $a$ and $b$ are constants. My result agrees with you.




                  Alternatively, note that
                  $$fractextdtextdx,exp(x),big(u'(x)-u(x)big)=frac2,exp(x)exp(x)+1,.$$
                  That is,
                  $$u'(x)-u(x)=int,fracexp(x)exp(x)+1,textdx=2,exp(-x),lnbig(exp(x)+1big)-2A,exp(-x)$$
                  for some constant $A$. That is,
                  $$fractextdtextdx,exp(-x),u(x)=2,exp(-2x),lnbig(exp(x)+1big)-2A,exp(-2x),.$$
                  Ergo,
                  $$u(x)=exp(+x),int,2,exp(-2x),lnbig(exp(x)+1big),textdx+A,exp(-x),.$$
                  Using integration by parts, we obtain
                  $$int,2,exp(-2x),lnbig(exp(x)+1big),textdx=-exp(-x)-x+2exp(-x),sinh(x),lnbig(1+exp(x)big)+B$$
                  for some constant $B$, and so we conclude that
                  $$u(x)=-1-x,exp(x)+2,sinh(x),lnbig(1+exp(x)big)+A,exp(-x)+B,exp(+x),.$$






                  share|cite|improve this answer















                  First,
                  $$W(x)=detleft(beginbmatrixexp(x)&exp(-x)\exp(x)&-exp(-x)endbmatrixright)=-2,.$$

                  That is, with a proper constant of integration,
                  $$beginalignv_1(x)&=-int,fracu_2(x),f(x)W(x),textdx
                  \&=-exp(-x)+lnbig(1+exp(-x)big)=-exp(-x)-x+lnbig(1+exp(x)big),.endalign$$
                  Likewise, for an appropriate choice of the constant of integration, we have
                  $$v_2(x)=+int,fracu_1(x),f(x)W(x),textdx=-lnbig(1+exp(x)big),.$$
                  Thus, a particular solution is
                  $$beginalignu_p(x)&=v_1(x),u_1(x)+v_2(x),u_2(x)
                  \&=smallexp(+x),Big(-exp(-x)-x+lnbig(1+exp(x)big)Big)-exp(-x),lnbig(1+exp(x)big)
                  \
                  &=-1-x,exp(x)+2,sinh(x),lnbig(1+exp(x)big),.endalign$$
                  Hence, the general solutions are of the form
                  $$u(x)=u_p(x)+a,exp(+x)+b,exp(-x),,$$
                  where $a$ and $b$ are constants. My result agrees with you.




                  Alternatively, note that
                  $$fractextdtextdx,exp(x),big(u'(x)-u(x)big)=frac2,exp(x)exp(x)+1,.$$
                  That is,
                  $$u'(x)-u(x)=int,fracexp(x)exp(x)+1,textdx=2,exp(-x),lnbig(exp(x)+1big)-2A,exp(-x)$$
                  for some constant $A$. That is,
                  $$fractextdtextdx,exp(-x),u(x)=2,exp(-2x),lnbig(exp(x)+1big)-2A,exp(-2x),.$$
                  Ergo,
                  $$u(x)=exp(+x),int,2,exp(-2x),lnbig(exp(x)+1big),textdx+A,exp(-x),.$$
                  Using integration by parts, we obtain
                  $$int,2,exp(-2x),lnbig(exp(x)+1big),textdx=-exp(-x)-x+2exp(-x),sinh(x),lnbig(1+exp(x)big)+B$$
                  for some constant $B$, and so we conclude that
                  $$u(x)=-1-x,exp(x)+2,sinh(x),lnbig(1+exp(x)big)+A,exp(-x)+B,exp(+x),.$$







                  share|cite|improve this answer















                  share|cite|improve this answer



                  share|cite|improve this answer








                  edited 19 hours ago


























                  answered 19 hours ago









                  Batominovski

                  22.2k22675




                  22.2k22675




















                      up vote
                      1
                      down vote













                      $$u''-u=frac2e^x+1$$
                      $$u''-u'+u'-u=frac2e^x+1$$
                      Substitute $s=u'-u$
                      $$s'+s=frac2e^x+1$$
                      $$(se^x)'=frac2e^xe^x+1$$
                      Integrating
                      $$se^x=2ln(e^x+1)+K_1$$
                      $$(u'-u)e^-x=2e^-2xln(e^x+1)+K_1e^-2x$$
                      $$(ue^-x)'=2e^-2xln(e^x+1)+K_1e^-2x$$
                      After integration
                      $$u=2e^xint ln(e^x+1)e^-2xdx+K_1e^-x+K_2e^x$$
                      $$u=-ln(e^x+1)e^-x+e^xint frac e^-xe^x+1dx+K_1e^-x+K_2e^x$$
                      Finally
                      $$u(x)=-ln(e^x+1)e^-x+e^xln( e^-x+1)-1+K_1e^-x+K_2e^x$$
                      or
                      $$u(x)=ln(e^x+1)(-e^-x+e^x)-1-xe^x+K_1e^-x+K_2e^x$$




                      Edit



                      I think the $−xe^x$ is wrong



                      It's not wrong I think it comes from the
                      $$e^xln(e^-x+1)=e^xln (e^x+1)-xe^x$$






                      share|cite|improve this answer























                      • I don't quite understand. Could you please explain your edit.
                        – Bell
                        9 hours ago










                      • @Bell Is this more clear ? $$e^xln(e^-x+1)=e^xln(frac 1 e^x+1)=e^xln (e^x+1)-e^xln e^x$$
                        – Isham
                        8 hours ago











                      • Yep, I understand. Although the general solution in the book is $$u(x)=e^xleft(C_1+ln|1+e^-x|-xright)+e^-xleft(C_2-ln|1+e^x|right)-1$$ but this does not look equivalent to both of our answers. Does this answer look correct to you?
                        – Bell
                        7 hours ago











                      • there is a sign mistake for the exponential inside the ln fucntion No it dosent look correct to me
                        – Isham
                        7 hours ago






                      • 1




                        ok @Bell have a nice day
                        – Isham
                        7 hours ago














                      up vote
                      1
                      down vote













                      $$u''-u=frac2e^x+1$$
                      $$u''-u'+u'-u=frac2e^x+1$$
                      Substitute $s=u'-u$
                      $$s'+s=frac2e^x+1$$
                      $$(se^x)'=frac2e^xe^x+1$$
                      Integrating
                      $$se^x=2ln(e^x+1)+K_1$$
                      $$(u'-u)e^-x=2e^-2xln(e^x+1)+K_1e^-2x$$
                      $$(ue^-x)'=2e^-2xln(e^x+1)+K_1e^-2x$$
                      After integration
                      $$u=2e^xint ln(e^x+1)e^-2xdx+K_1e^-x+K_2e^x$$
                      $$u=-ln(e^x+1)e^-x+e^xint frac e^-xe^x+1dx+K_1e^-x+K_2e^x$$
                      Finally
                      $$u(x)=-ln(e^x+1)e^-x+e^xln( e^-x+1)-1+K_1e^-x+K_2e^x$$
                      or
                      $$u(x)=ln(e^x+1)(-e^-x+e^x)-1-xe^x+K_1e^-x+K_2e^x$$




                      Edit



                      I think the $−xe^x$ is wrong



                      It's not wrong I think it comes from the
                      $$e^xln(e^-x+1)=e^xln (e^x+1)-xe^x$$






                      share|cite|improve this answer























                      • I don't quite understand. Could you please explain your edit.
                        – Bell
                        9 hours ago










                      • @Bell Is this more clear ? $$e^xln(e^-x+1)=e^xln(frac 1 e^x+1)=e^xln (e^x+1)-e^xln e^x$$
                        – Isham
                        8 hours ago











                      • Yep, I understand. Although the general solution in the book is $$u(x)=e^xleft(C_1+ln|1+e^-x|-xright)+e^-xleft(C_2-ln|1+e^x|right)-1$$ but this does not look equivalent to both of our answers. Does this answer look correct to you?
                        – Bell
                        7 hours ago











                      • there is a sign mistake for the exponential inside the ln fucntion No it dosent look correct to me
                        – Isham
                        7 hours ago






                      • 1




                        ok @Bell have a nice day
                        – Isham
                        7 hours ago












                      up vote
                      1
                      down vote










                      up vote
                      1
                      down vote









                      $$u''-u=frac2e^x+1$$
                      $$u''-u'+u'-u=frac2e^x+1$$
                      Substitute $s=u'-u$
                      $$s'+s=frac2e^x+1$$
                      $$(se^x)'=frac2e^xe^x+1$$
                      Integrating
                      $$se^x=2ln(e^x+1)+K_1$$
                      $$(u'-u)e^-x=2e^-2xln(e^x+1)+K_1e^-2x$$
                      $$(ue^-x)'=2e^-2xln(e^x+1)+K_1e^-2x$$
                      After integration
                      $$u=2e^xint ln(e^x+1)e^-2xdx+K_1e^-x+K_2e^x$$
                      $$u=-ln(e^x+1)e^-x+e^xint frac e^-xe^x+1dx+K_1e^-x+K_2e^x$$
                      Finally
                      $$u(x)=-ln(e^x+1)e^-x+e^xln( e^-x+1)-1+K_1e^-x+K_2e^x$$
                      or
                      $$u(x)=ln(e^x+1)(-e^-x+e^x)-1-xe^x+K_1e^-x+K_2e^x$$




                      Edit



                      I think the $−xe^x$ is wrong



                      It's not wrong I think it comes from the
                      $$e^xln(e^-x+1)=e^xln (e^x+1)-xe^x$$






                      share|cite|improve this answer















                      $$u''-u=frac2e^x+1$$
                      $$u''-u'+u'-u=frac2e^x+1$$
                      Substitute $s=u'-u$
                      $$s'+s=frac2e^x+1$$
                      $$(se^x)'=frac2e^xe^x+1$$
                      Integrating
                      $$se^x=2ln(e^x+1)+K_1$$
                      $$(u'-u)e^-x=2e^-2xln(e^x+1)+K_1e^-2x$$
                      $$(ue^-x)'=2e^-2xln(e^x+1)+K_1e^-2x$$
                      After integration
                      $$u=2e^xint ln(e^x+1)e^-2xdx+K_1e^-x+K_2e^x$$
                      $$u=-ln(e^x+1)e^-x+e^xint frac e^-xe^x+1dx+K_1e^-x+K_2e^x$$
                      Finally
                      $$u(x)=-ln(e^x+1)e^-x+e^xln( e^-x+1)-1+K_1e^-x+K_2e^x$$
                      or
                      $$u(x)=ln(e^x+1)(-e^-x+e^x)-1-xe^x+K_1e^-x+K_2e^x$$




                      Edit



                      I think the $−xe^x$ is wrong



                      It's not wrong I think it comes from the
                      $$e^xln(e^-x+1)=e^xln (e^x+1)-xe^x$$







                      share|cite|improve this answer















                      share|cite|improve this answer



                      share|cite|improve this answer








                      edited 14 hours ago


























                      answered 19 hours ago









                      Isham

                      10.4k3729




                      10.4k3729











                      • I don't quite understand. Could you please explain your edit.
                        – Bell
                        9 hours ago










                      • @Bell Is this more clear ? $$e^xln(e^-x+1)=e^xln(frac 1 e^x+1)=e^xln (e^x+1)-e^xln e^x$$
                        – Isham
                        8 hours ago











                      • Yep, I understand. Although the general solution in the book is $$u(x)=e^xleft(C_1+ln|1+e^-x|-xright)+e^-xleft(C_2-ln|1+e^x|right)-1$$ but this does not look equivalent to both of our answers. Does this answer look correct to you?
                        – Bell
                        7 hours ago











                      • there is a sign mistake for the exponential inside the ln fucntion No it dosent look correct to me
                        – Isham
                        7 hours ago






                      • 1




                        ok @Bell have a nice day
                        – Isham
                        7 hours ago
















                      • I don't quite understand. Could you please explain your edit.
                        – Bell
                        9 hours ago










                      • @Bell Is this more clear ? $$e^xln(e^-x+1)=e^xln(frac 1 e^x+1)=e^xln (e^x+1)-e^xln e^x$$
                        – Isham
                        8 hours ago











                      • Yep, I understand. Although the general solution in the book is $$u(x)=e^xleft(C_1+ln|1+e^-x|-xright)+e^-xleft(C_2-ln|1+e^x|right)-1$$ but this does not look equivalent to both of our answers. Does this answer look correct to you?
                        – Bell
                        7 hours ago











                      • there is a sign mistake for the exponential inside the ln fucntion No it dosent look correct to me
                        – Isham
                        7 hours ago






                      • 1




                        ok @Bell have a nice day
                        – Isham
                        7 hours ago















                      I don't quite understand. Could you please explain your edit.
                      – Bell
                      9 hours ago




                      I don't quite understand. Could you please explain your edit.
                      – Bell
                      9 hours ago












                      @Bell Is this more clear ? $$e^xln(e^-x+1)=e^xln(frac 1 e^x+1)=e^xln (e^x+1)-e^xln e^x$$
                      – Isham
                      8 hours ago





                      @Bell Is this more clear ? $$e^xln(e^-x+1)=e^xln(frac 1 e^x+1)=e^xln (e^x+1)-e^xln e^x$$
                      – Isham
                      8 hours ago













                      Yep, I understand. Although the general solution in the book is $$u(x)=e^xleft(C_1+ln|1+e^-x|-xright)+e^-xleft(C_2-ln|1+e^x|right)-1$$ but this does not look equivalent to both of our answers. Does this answer look correct to you?
                      – Bell
                      7 hours ago





                      Yep, I understand. Although the general solution in the book is $$u(x)=e^xleft(C_1+ln|1+e^-x|-xright)+e^-xleft(C_2-ln|1+e^x|right)-1$$ but this does not look equivalent to both of our answers. Does this answer look correct to you?
                      – Bell
                      7 hours ago













                      there is a sign mistake for the exponential inside the ln fucntion No it dosent look correct to me
                      – Isham
                      7 hours ago




                      there is a sign mistake for the exponential inside the ln fucntion No it dosent look correct to me
                      – Isham
                      7 hours ago




                      1




                      1




                      ok @Bell have a nice day
                      – Isham
                      7 hours ago




                      ok @Bell have a nice day
                      – Isham
                      7 hours ago












                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2872900%2fusing-variation-of-parameters-to-find-the-general-solution-of-u-u-frac2e%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Comments

                      Popular posts from this blog

                      What is the equation of a 3D cone with generalised tilt?

                      Color the edges and diagonals of a regular polygon

                      Relationship between determinant of matrix and determinant of adjoint?