How to evaluate this function?












4












$begingroup$


I’m trying to evaluate



y[t] = InverseFunction[ NIntegrate[Sqrt[2]/( -8+Exp[y]+2Exp[-y]), {y,0,t}]]



Some of the problems I’m facing, is that i’d like to get the integral’s result in terms of t as a definite integral.



Any help to get y[0], y[1] and y’[0] ?










share|improve this question











$endgroup$

















    4












    $begingroup$


    I’m trying to evaluate



    y[t] = InverseFunction[ NIntegrate[Sqrt[2]/( -8+Exp[y]+2Exp[-y]), {y,0,t}]]



    Some of the problems I’m facing, is that i’d like to get the integral’s result in terms of t as a definite integral.



    Any help to get y[0], y[1] and y’[0] ?










    share|improve this question











    $endgroup$















      4












      4








      4





      $begingroup$


      I’m trying to evaluate



      y[t] = InverseFunction[ NIntegrate[Sqrt[2]/( -8+Exp[y]+2Exp[-y]), {y,0,t}]]



      Some of the problems I’m facing, is that i’d like to get the integral’s result in terms of t as a definite integral.



      Any help to get y[0], y[1] and y’[0] ?










      share|improve this question











      $endgroup$




      I’m trying to evaluate



      y[t] = InverseFunction[ NIntegrate[Sqrt[2]/( -8+Exp[y]+2Exp[-y]), {y,0,t}]]



      Some of the problems I’m facing, is that i’d like to get the integral’s result in terms of t as a definite integral.



      Any help to get y[0], y[1] and y’[0] ?







      calculus-and-analysis numerical-integration numerics






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 21 at 7:10







      S.S.

















      asked Apr 21 at 6:54









      S.S.S.S.

      1266




      1266






















          2 Answers
          2






          active

          oldest

          votes


















          3












          $begingroup$

          Assuming the integral is not possible to evaluate symbolically, so that Roman's approach was not available, it is still possible to construct an interpolating function solution of the inverse. First, rewrite your relationship as follows:



          eqn = y == Inactive[Integrate][Sqrt[2]/(-8+Exp[s]+2Exp[-s]),{s,0,t[y]}];
          eqn //TeXForm



          $y=int _0^{t(y)}frac{sqrt{2}}{2 e^{-s}+e^s-8}ds$




          where I renamed the integration variable to avoid confusion. Then, differentiating with respect to y produces an ODE:



          ode = D[eqn, y];
          ode //TeXForm



          $1=frac{sqrt{2} t'(y)}{2 e^{-t(y)}+e^{t(y)}-8}$




          For initial conditions, clearly t[0] == 0. So, we need to solve:



          sol = NDSolveValue[{ode, t[0]==0}, t, {y, -1, 1}];


          Visualization:



          Plot[sol[y], {y, -1, 1}]


          enter image description here



          Comparison with the exact answer (as provided by Roman):



          sol[0]
          sol[1]
          sol'[0]



          0.



          -1.33756



          -3.53553




          vs:



          roman[y_] := Log[4-Sqrt[14] Tanh[Sqrt[7] y+ArcTanh[3/Sqrt[14]]]]

          roman[0]
          roman[1] //N
          roman'[0] //N



          0



          -1.33756



          -3.53553







          share|improve this answer









          $endgroup$





















            8












            $begingroup$

            No need to do numerical integration, you can do this one analytically.



            Start with the integral:



            Integrate[Sqrt[2]/(-8 + Exp[y] + 2 Exp[-y]), {y, 0, t}]
            (* ConditionalExpression[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]),
            E^t == 4 || (-4 + E^t)^2 <= 0] *)


            It turns out that this result is valid for $ln(4-sqrt{14})<t<ln(4+sqrt{14})$:



            Plot[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]),
            {t, Log[4 - Sqrt[14]], Log[4 + Sqrt[14]]}]


            enter image description here



            Invert it:



            Solve[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]) == y, t]


            (expression that I simplify by hand to get rid of branches:)



            t[y_] = Log[4 - Sqrt[14] Tanh[Sqrt[7] y + ArcTanh[3/Sqrt[14]]]];
            Plot[t[y], {y, -1, 1}]


            enter image description here



            From this you get your points of interest:



            t[0]
            (* 0 *)

            t[1]
            (* Log[4 - Sqrt[14] Tanh[Sqrt[7] + ArcTanh[3/Sqrt[14]]]] *)

            t'[0]
            (* -5/Sqrt[2] *)





            share|improve this answer











            $endgroup$














              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "387"
              };
              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: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              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
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f195696%2fhow-to-evaluate-this-function%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              3












              $begingroup$

              Assuming the integral is not possible to evaluate symbolically, so that Roman's approach was not available, it is still possible to construct an interpolating function solution of the inverse. First, rewrite your relationship as follows:



              eqn = y == Inactive[Integrate][Sqrt[2]/(-8+Exp[s]+2Exp[-s]),{s,0,t[y]}];
              eqn //TeXForm



              $y=int _0^{t(y)}frac{sqrt{2}}{2 e^{-s}+e^s-8}ds$




              where I renamed the integration variable to avoid confusion. Then, differentiating with respect to y produces an ODE:



              ode = D[eqn, y];
              ode //TeXForm



              $1=frac{sqrt{2} t'(y)}{2 e^{-t(y)}+e^{t(y)}-8}$




              For initial conditions, clearly t[0] == 0. So, we need to solve:



              sol = NDSolveValue[{ode, t[0]==0}, t, {y, -1, 1}];


              Visualization:



              Plot[sol[y], {y, -1, 1}]


              enter image description here



              Comparison with the exact answer (as provided by Roman):



              sol[0]
              sol[1]
              sol'[0]



              0.



              -1.33756



              -3.53553




              vs:



              roman[y_] := Log[4-Sqrt[14] Tanh[Sqrt[7] y+ArcTanh[3/Sqrt[14]]]]

              roman[0]
              roman[1] //N
              roman'[0] //N



              0



              -1.33756



              -3.53553







              share|improve this answer









              $endgroup$


















                3












                $begingroup$

                Assuming the integral is not possible to evaluate symbolically, so that Roman's approach was not available, it is still possible to construct an interpolating function solution of the inverse. First, rewrite your relationship as follows:



                eqn = y == Inactive[Integrate][Sqrt[2]/(-8+Exp[s]+2Exp[-s]),{s,0,t[y]}];
                eqn //TeXForm



                $y=int _0^{t(y)}frac{sqrt{2}}{2 e^{-s}+e^s-8}ds$




                where I renamed the integration variable to avoid confusion. Then, differentiating with respect to y produces an ODE:



                ode = D[eqn, y];
                ode //TeXForm



                $1=frac{sqrt{2} t'(y)}{2 e^{-t(y)}+e^{t(y)}-8}$




                For initial conditions, clearly t[0] == 0. So, we need to solve:



                sol = NDSolveValue[{ode, t[0]==0}, t, {y, -1, 1}];


                Visualization:



                Plot[sol[y], {y, -1, 1}]


                enter image description here



                Comparison with the exact answer (as provided by Roman):



                sol[0]
                sol[1]
                sol'[0]



                0.



                -1.33756



                -3.53553




                vs:



                roman[y_] := Log[4-Sqrt[14] Tanh[Sqrt[7] y+ArcTanh[3/Sqrt[14]]]]

                roman[0]
                roman[1] //N
                roman'[0] //N



                0



                -1.33756



                -3.53553







                share|improve this answer









                $endgroup$
















                  3












                  3








                  3





                  $begingroup$

                  Assuming the integral is not possible to evaluate symbolically, so that Roman's approach was not available, it is still possible to construct an interpolating function solution of the inverse. First, rewrite your relationship as follows:



                  eqn = y == Inactive[Integrate][Sqrt[2]/(-8+Exp[s]+2Exp[-s]),{s,0,t[y]}];
                  eqn //TeXForm



                  $y=int _0^{t(y)}frac{sqrt{2}}{2 e^{-s}+e^s-8}ds$




                  where I renamed the integration variable to avoid confusion. Then, differentiating with respect to y produces an ODE:



                  ode = D[eqn, y];
                  ode //TeXForm



                  $1=frac{sqrt{2} t'(y)}{2 e^{-t(y)}+e^{t(y)}-8}$




                  For initial conditions, clearly t[0] == 0. So, we need to solve:



                  sol = NDSolveValue[{ode, t[0]==0}, t, {y, -1, 1}];


                  Visualization:



                  Plot[sol[y], {y, -1, 1}]


                  enter image description here



                  Comparison with the exact answer (as provided by Roman):



                  sol[0]
                  sol[1]
                  sol'[0]



                  0.



                  -1.33756



                  -3.53553




                  vs:



                  roman[y_] := Log[4-Sqrt[14] Tanh[Sqrt[7] y+ArcTanh[3/Sqrt[14]]]]

                  roman[0]
                  roman[1] //N
                  roman'[0] //N



                  0



                  -1.33756



                  -3.53553







                  share|improve this answer









                  $endgroup$



                  Assuming the integral is not possible to evaluate symbolically, so that Roman's approach was not available, it is still possible to construct an interpolating function solution of the inverse. First, rewrite your relationship as follows:



                  eqn = y == Inactive[Integrate][Sqrt[2]/(-8+Exp[s]+2Exp[-s]),{s,0,t[y]}];
                  eqn //TeXForm



                  $y=int _0^{t(y)}frac{sqrt{2}}{2 e^{-s}+e^s-8}ds$




                  where I renamed the integration variable to avoid confusion. Then, differentiating with respect to y produces an ODE:



                  ode = D[eqn, y];
                  ode //TeXForm



                  $1=frac{sqrt{2} t'(y)}{2 e^{-t(y)}+e^{t(y)}-8}$




                  For initial conditions, clearly t[0] == 0. So, we need to solve:



                  sol = NDSolveValue[{ode, t[0]==0}, t, {y, -1, 1}];


                  Visualization:



                  Plot[sol[y], {y, -1, 1}]


                  enter image description here



                  Comparison with the exact answer (as provided by Roman):



                  sol[0]
                  sol[1]
                  sol'[0]



                  0.



                  -1.33756



                  -3.53553




                  vs:



                  roman[y_] := Log[4-Sqrt[14] Tanh[Sqrt[7] y+ArcTanh[3/Sqrt[14]]]]

                  roman[0]
                  roman[1] //N
                  roman'[0] //N



                  0



                  -1.33756



                  -3.53553








                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 21 at 15:17









                  Carl WollCarl Woll

                  75.8k3100198




                  75.8k3100198























                      8












                      $begingroup$

                      No need to do numerical integration, you can do this one analytically.



                      Start with the integral:



                      Integrate[Sqrt[2]/(-8 + Exp[y] + 2 Exp[-y]), {y, 0, t}]
                      (* ConditionalExpression[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]),
                      E^t == 4 || (-4 + E^t)^2 <= 0] *)


                      It turns out that this result is valid for $ln(4-sqrt{14})<t<ln(4+sqrt{14})$:



                      Plot[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]),
                      {t, Log[4 - Sqrt[14]], Log[4 + Sqrt[14]]}]


                      enter image description here



                      Invert it:



                      Solve[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]) == y, t]


                      (expression that I simplify by hand to get rid of branches:)



                      t[y_] = Log[4 - Sqrt[14] Tanh[Sqrt[7] y + ArcTanh[3/Sqrt[14]]]];
                      Plot[t[y], {y, -1, 1}]


                      enter image description here



                      From this you get your points of interest:



                      t[0]
                      (* 0 *)

                      t[1]
                      (* Log[4 - Sqrt[14] Tanh[Sqrt[7] + ArcTanh[3/Sqrt[14]]]] *)

                      t'[0]
                      (* -5/Sqrt[2] *)





                      share|improve this answer











                      $endgroup$


















                        8












                        $begingroup$

                        No need to do numerical integration, you can do this one analytically.



                        Start with the integral:



                        Integrate[Sqrt[2]/(-8 + Exp[y] + 2 Exp[-y]), {y, 0, t}]
                        (* ConditionalExpression[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]),
                        E^t == 4 || (-4 + E^t)^2 <= 0] *)


                        It turns out that this result is valid for $ln(4-sqrt{14})<t<ln(4+sqrt{14})$:



                        Plot[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]),
                        {t, Log[4 - Sqrt[14]], Log[4 + Sqrt[14]]}]


                        enter image description here



                        Invert it:



                        Solve[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]) == y, t]


                        (expression that I simplify by hand to get rid of branches:)



                        t[y_] = Log[4 - Sqrt[14] Tanh[Sqrt[7] y + ArcTanh[3/Sqrt[14]]]];
                        Plot[t[y], {y, -1, 1}]


                        enter image description here



                        From this you get your points of interest:



                        t[0]
                        (* 0 *)

                        t[1]
                        (* Log[4 - Sqrt[14] Tanh[Sqrt[7] + ArcTanh[3/Sqrt[14]]]] *)

                        t'[0]
                        (* -5/Sqrt[2] *)





                        share|improve this answer











                        $endgroup$
















                          8












                          8








                          8





                          $begingroup$

                          No need to do numerical integration, you can do this one analytically.



                          Start with the integral:



                          Integrate[Sqrt[2]/(-8 + Exp[y] + 2 Exp[-y]), {y, 0, t}]
                          (* ConditionalExpression[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]),
                          E^t == 4 || (-4 + E^t)^2 <= 0] *)


                          It turns out that this result is valid for $ln(4-sqrt{14})<t<ln(4+sqrt{14})$:



                          Plot[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]),
                          {t, Log[4 - Sqrt[14]], Log[4 + Sqrt[14]]}]


                          enter image description here



                          Invert it:



                          Solve[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]) == y, t]


                          (expression that I simplify by hand to get rid of branches:)



                          t[y_] = Log[4 - Sqrt[14] Tanh[Sqrt[7] y + ArcTanh[3/Sqrt[14]]]];
                          Plot[t[y], {y, -1, 1}]


                          enter image description here



                          From this you get your points of interest:



                          t[0]
                          (* 0 *)

                          t[1]
                          (* Log[4 - Sqrt[14] Tanh[Sqrt[7] + ArcTanh[3/Sqrt[14]]]] *)

                          t'[0]
                          (* -5/Sqrt[2] *)





                          share|improve this answer











                          $endgroup$



                          No need to do numerical integration, you can do this one analytically.



                          Start with the integral:



                          Integrate[Sqrt[2]/(-8 + Exp[y] + 2 Exp[-y]), {y, 0, t}]
                          (* ConditionalExpression[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]),
                          E^t == 4 || (-4 + E^t)^2 <= 0] *)


                          It turns out that this result is valid for $ln(4-sqrt{14})<t<ln(4+sqrt{14})$:



                          Plot[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]),
                          {t, Log[4 - Sqrt[14]], Log[4 + Sqrt[14]]}]


                          enter image description here



                          Invert it:



                          Solve[-((ArcTanh[3/Sqrt[14]] + ArcTanh[(-4 + E^t)/Sqrt[14]])/Sqrt[7]) == y, t]


                          (expression that I simplify by hand to get rid of branches:)



                          t[y_] = Log[4 - Sqrt[14] Tanh[Sqrt[7] y + ArcTanh[3/Sqrt[14]]]];
                          Plot[t[y], {y, -1, 1}]


                          enter image description here



                          From this you get your points of interest:



                          t[0]
                          (* 0 *)

                          t[1]
                          (* Log[4 - Sqrt[14] Tanh[Sqrt[7] + ArcTanh[3/Sqrt[14]]]] *)

                          t'[0]
                          (* -5/Sqrt[2] *)






                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Apr 21 at 8:29

























                          answered Apr 21 at 8:11









                          RomanRoman

                          6,07611132




                          6,07611132






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Mathematica 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%2fmathematica.stackexchange.com%2fquestions%2f195696%2fhow-to-evaluate-this-function%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

                              Brian Clough

                              Cáceres