Finding an Inverse of Restricted Gamma Function












0












$begingroup$


I don't know/haven't used LaTeX yet but I'll do my best to keep it simple,



I'm working on my undergrad senior project and I'm trying to find an inverse function for f(x)=(x-1)! just in the positive reals. I was inspired to ask this question when in one of my probability classes my professor talked about how something like π! existed. Now, obviously, this isn't a 1:1 function so an inverse doesn't exist, but I first restricted the function just to x > 0 and then restricted it further after finding the minimum which is x=1.461632... or the positive root of the digamma function. You can see what I mean on this graph (the green one is what I'm trying to find the inverse of). After restricting the domain to x>1.461632... , the function is 1:1 and an inverse does exist.



This is where I'm stuck at.



I guess what I'm asking is that is there a way to find this inverse? I know that, for example, f^-1(120)=5 and f^-1(3(√π )/4)=2.5 but what of something like f^-1(25) or f^-1(e)? I've seen things like Stirling's Approximation and finding an inverse based off of that but I wanted to see if anybody else has any ideas of what I can do next.



Thank you for your time and let me know if you have any questions about my post.










share|cite|improve this question









$endgroup$

















    0












    $begingroup$


    I don't know/haven't used LaTeX yet but I'll do my best to keep it simple,



    I'm working on my undergrad senior project and I'm trying to find an inverse function for f(x)=(x-1)! just in the positive reals. I was inspired to ask this question when in one of my probability classes my professor talked about how something like π! existed. Now, obviously, this isn't a 1:1 function so an inverse doesn't exist, but I first restricted the function just to x > 0 and then restricted it further after finding the minimum which is x=1.461632... or the positive root of the digamma function. You can see what I mean on this graph (the green one is what I'm trying to find the inverse of). After restricting the domain to x>1.461632... , the function is 1:1 and an inverse does exist.



    This is where I'm stuck at.



    I guess what I'm asking is that is there a way to find this inverse? I know that, for example, f^-1(120)=5 and f^-1(3(√π )/4)=2.5 but what of something like f^-1(25) or f^-1(e)? I've seen things like Stirling's Approximation and finding an inverse based off of that but I wanted to see if anybody else has any ideas of what I can do next.



    Thank you for your time and let me know if you have any questions about my post.










    share|cite|improve this question









    $endgroup$















      0












      0








      0





      $begingroup$


      I don't know/haven't used LaTeX yet but I'll do my best to keep it simple,



      I'm working on my undergrad senior project and I'm trying to find an inverse function for f(x)=(x-1)! just in the positive reals. I was inspired to ask this question when in one of my probability classes my professor talked about how something like π! existed. Now, obviously, this isn't a 1:1 function so an inverse doesn't exist, but I first restricted the function just to x > 0 and then restricted it further after finding the minimum which is x=1.461632... or the positive root of the digamma function. You can see what I mean on this graph (the green one is what I'm trying to find the inverse of). After restricting the domain to x>1.461632... , the function is 1:1 and an inverse does exist.



      This is where I'm stuck at.



      I guess what I'm asking is that is there a way to find this inverse? I know that, for example, f^-1(120)=5 and f^-1(3(√π )/4)=2.5 but what of something like f^-1(25) or f^-1(e)? I've seen things like Stirling's Approximation and finding an inverse based off of that but I wanted to see if anybody else has any ideas of what I can do next.



      Thank you for your time and let me know if you have any questions about my post.










      share|cite|improve this question









      $endgroup$




      I don't know/haven't used LaTeX yet but I'll do my best to keep it simple,



      I'm working on my undergrad senior project and I'm trying to find an inverse function for f(x)=(x-1)! just in the positive reals. I was inspired to ask this question when in one of my probability classes my professor talked about how something like π! existed. Now, obviously, this isn't a 1:1 function so an inverse doesn't exist, but I first restricted the function just to x > 0 and then restricted it further after finding the minimum which is x=1.461632... or the positive root of the digamma function. You can see what I mean on this graph (the green one is what I'm trying to find the inverse of). After restricting the domain to x>1.461632... , the function is 1:1 and an inverse does exist.



      This is where I'm stuck at.



      I guess what I'm asking is that is there a way to find this inverse? I know that, for example, f^-1(120)=5 and f^-1(3(√π )/4)=2.5 but what of something like f^-1(25) or f^-1(e)? I've seen things like Stirling's Approximation and finding an inverse based off of that but I wanted to see if anybody else has any ideas of what I can do next.



      Thank you for your time and let me know if you have any questions about my post.







      factorial gamma-function inverse-function digamma-function






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Jan 31 at 21:09









      DoleseDolese

      62




      62






















          2 Answers
          2






          active

          oldest

          votes


















          0












          $begingroup$

          There is the algorithm by David W. Cantrell as described here. The idea is that we can use



          $$g(x) = sqrt{2pi}{left(frac{x-1/2}{e}right)^{x-1/2}} - c$$



          as an approximation of $Gamma(x)$. Here $c = sqrt{2pi}/e - Gamma(k)$ where $k$ is the positive zero of the derivative of $Gamma$. We can invert this function in terms of the Lambert $W$-function. First we set



          $$L(x) = lnleft(frac{x+c}{sqrt{2pi}}right)$$



          and then we get



          $$AIG(y) := g^{-1}(y) = frac{L(x)}{Wleft(frac{L(x)}{e}right)} + 1/2.$$



          As the arguments increase the error gets very small, consider following evaluations:



          $$begin{array}{r|ll}
          N & AIG((N-1)!) & text{error} \ hline
          2 & hphantom{1}2.02 & hphantom{-}0.01 \
          5 & hphantom{1}4.995 & -0.001 \
          10 & hphantom{1}9.998 & -0.0002 \
          20 & 19.9993 & -0.00004 \
          end{array}$$






          share|cite|improve this answer









          $endgroup$





















            0












            $begingroup$

            Bear in mind in reading this that I am an engineer, and this is just a non-rigorous sketch of what you could try.



            Assuming you are allowed to use the Gamma Function integral defined for the positive reals only, then you can use this function to calculate the "Inverse Gamma Function" for the positive reals up to any desired cut off as long as you are willing utilize and prove the identity:



            $$sin(pi z)=frac{pi z}{Gamma(1-z)Gamma(1+z)}tag{1}$$



            where $Gamma(z)=int_0^{infty } e^{-t} t^{z-1} , dt$ for $z>0$



            Rearranging (1) we have



            $$frac{z}{Gamma(1+z)}=frac{ Gamma(1-z) sin(pi z)}{pi}=left(frac{1}{Gamma(z)}right)$$



            You will immediately say that this only works for $0<z<1$ so it is not much use for your purpose, but we can write



            $$frac{zprod _{k=1}^{n-1} (z+k)}{Gamma(n+z)}=frac{ Gamma(n-z) sin(pi (z+n-1))}{pi prod _{k=1}^{n-1} (z-k)} =left(frac{1}{Gamma(z)}right)$$



            where n is a positve integer $ge 1$. Therefore you can now calculate your inverse Gamma Function with $z$ in the range $0<z<n$, without worrying about how to calculate negative factorials!



            Edit 1:
            Lets push this a bit further and define a Pochammer Function approximation to the Gamma Function $Gamma_P$



            $$Gamma_P(z)=prod _{k=1}^{lfloor z-1rfloor } ((-lfloor z-1rfloor +z-1)+k)$$



            where $lfloor zrfloor$ is the floor function on $z$ and



            $$Gamma(z)=Gamma ((z-lfloor zrfloor )+1) Gamma_P(z)$$



            which gives
            $$frac{Gamma ((z-lfloor zrfloor )+1) Gamma_P(n-z) sin (pi (n+z-1))}{pi prod _{k=1}^{n-1} (z-k)}approxleft(frac{1}{Gamma(z)}right)tag{2}$$



            with the true Gamma Function $Gamma ((z-lfloor zrfloor )+1)$ now just used in the range $1le ((z-lfloor zrfloor )+1) le 2$



            (Note: Equation 2 is approximate, and $n$ can be set to $1$, simplifying the formula - not sure about the origin of the error here need to review this when I have time)



            I've plotted $Gamma ((z-lfloor zrfloor )+1)$ alongside a very rough half sine wave approximation (in orange)
            $$Gamma ((z-lfloor zrfloor )+1)approx1-left(1-frac{sqrt{pi }}{2}right) sin (pi (z-lfloor zrfloor ))$$



            Gamma Function vs Half Sine Wave Approximation



            Finally a comparison between the approximate inverse Gamma Function using the half sine wave approximation and the real one



            Comparison approximate and real inverse Gamma function






            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%2f3095461%2ffinding-an-inverse-of-restricted-gamma-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









              0












              $begingroup$

              There is the algorithm by David W. Cantrell as described here. The idea is that we can use



              $$g(x) = sqrt{2pi}{left(frac{x-1/2}{e}right)^{x-1/2}} - c$$



              as an approximation of $Gamma(x)$. Here $c = sqrt{2pi}/e - Gamma(k)$ where $k$ is the positive zero of the derivative of $Gamma$. We can invert this function in terms of the Lambert $W$-function. First we set



              $$L(x) = lnleft(frac{x+c}{sqrt{2pi}}right)$$



              and then we get



              $$AIG(y) := g^{-1}(y) = frac{L(x)}{Wleft(frac{L(x)}{e}right)} + 1/2.$$



              As the arguments increase the error gets very small, consider following evaluations:



              $$begin{array}{r|ll}
              N & AIG((N-1)!) & text{error} \ hline
              2 & hphantom{1}2.02 & hphantom{-}0.01 \
              5 & hphantom{1}4.995 & -0.001 \
              10 & hphantom{1}9.998 & -0.0002 \
              20 & 19.9993 & -0.00004 \
              end{array}$$






              share|cite|improve this answer









              $endgroup$


















                0












                $begingroup$

                There is the algorithm by David W. Cantrell as described here. The idea is that we can use



                $$g(x) = sqrt{2pi}{left(frac{x-1/2}{e}right)^{x-1/2}} - c$$



                as an approximation of $Gamma(x)$. Here $c = sqrt{2pi}/e - Gamma(k)$ where $k$ is the positive zero of the derivative of $Gamma$. We can invert this function in terms of the Lambert $W$-function. First we set



                $$L(x) = lnleft(frac{x+c}{sqrt{2pi}}right)$$



                and then we get



                $$AIG(y) := g^{-1}(y) = frac{L(x)}{Wleft(frac{L(x)}{e}right)} + 1/2.$$



                As the arguments increase the error gets very small, consider following evaluations:



                $$begin{array}{r|ll}
                N & AIG((N-1)!) & text{error} \ hline
                2 & hphantom{1}2.02 & hphantom{-}0.01 \
                5 & hphantom{1}4.995 & -0.001 \
                10 & hphantom{1}9.998 & -0.0002 \
                20 & 19.9993 & -0.00004 \
                end{array}$$






                share|cite|improve this answer









                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  There is the algorithm by David W. Cantrell as described here. The idea is that we can use



                  $$g(x) = sqrt{2pi}{left(frac{x-1/2}{e}right)^{x-1/2}} - c$$



                  as an approximation of $Gamma(x)$. Here $c = sqrt{2pi}/e - Gamma(k)$ where $k$ is the positive zero of the derivative of $Gamma$. We can invert this function in terms of the Lambert $W$-function. First we set



                  $$L(x) = lnleft(frac{x+c}{sqrt{2pi}}right)$$



                  and then we get



                  $$AIG(y) := g^{-1}(y) = frac{L(x)}{Wleft(frac{L(x)}{e}right)} + 1/2.$$



                  As the arguments increase the error gets very small, consider following evaluations:



                  $$begin{array}{r|ll}
                  N & AIG((N-1)!) & text{error} \ hline
                  2 & hphantom{1}2.02 & hphantom{-}0.01 \
                  5 & hphantom{1}4.995 & -0.001 \
                  10 & hphantom{1}9.998 & -0.0002 \
                  20 & 19.9993 & -0.00004 \
                  end{array}$$






                  share|cite|improve this answer









                  $endgroup$



                  There is the algorithm by David W. Cantrell as described here. The idea is that we can use



                  $$g(x) = sqrt{2pi}{left(frac{x-1/2}{e}right)^{x-1/2}} - c$$



                  as an approximation of $Gamma(x)$. Here $c = sqrt{2pi}/e - Gamma(k)$ where $k$ is the positive zero of the derivative of $Gamma$. We can invert this function in terms of the Lambert $W$-function. First we set



                  $$L(x) = lnleft(frac{x+c}{sqrt{2pi}}right)$$



                  and then we get



                  $$AIG(y) := g^{-1}(y) = frac{L(x)}{Wleft(frac{L(x)}{e}right)} + 1/2.$$



                  As the arguments increase the error gets very small, consider following evaluations:



                  $$begin{array}{r|ll}
                  N & AIG((N-1)!) & text{error} \ hline
                  2 & hphantom{1}2.02 & hphantom{-}0.01 \
                  5 & hphantom{1}4.995 & -0.001 \
                  10 & hphantom{1}9.998 & -0.0002 \
                  20 & 19.9993 & -0.00004 \
                  end{array}$$







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Jan 31 at 21:49









                  flawrflawr

                  11.7k32546




                  11.7k32546























                      0












                      $begingroup$

                      Bear in mind in reading this that I am an engineer, and this is just a non-rigorous sketch of what you could try.



                      Assuming you are allowed to use the Gamma Function integral defined for the positive reals only, then you can use this function to calculate the "Inverse Gamma Function" for the positive reals up to any desired cut off as long as you are willing utilize and prove the identity:



                      $$sin(pi z)=frac{pi z}{Gamma(1-z)Gamma(1+z)}tag{1}$$



                      where $Gamma(z)=int_0^{infty } e^{-t} t^{z-1} , dt$ for $z>0$



                      Rearranging (1) we have



                      $$frac{z}{Gamma(1+z)}=frac{ Gamma(1-z) sin(pi z)}{pi}=left(frac{1}{Gamma(z)}right)$$



                      You will immediately say that this only works for $0<z<1$ so it is not much use for your purpose, but we can write



                      $$frac{zprod _{k=1}^{n-1} (z+k)}{Gamma(n+z)}=frac{ Gamma(n-z) sin(pi (z+n-1))}{pi prod _{k=1}^{n-1} (z-k)} =left(frac{1}{Gamma(z)}right)$$



                      where n is a positve integer $ge 1$. Therefore you can now calculate your inverse Gamma Function with $z$ in the range $0<z<n$, without worrying about how to calculate negative factorials!



                      Edit 1:
                      Lets push this a bit further and define a Pochammer Function approximation to the Gamma Function $Gamma_P$



                      $$Gamma_P(z)=prod _{k=1}^{lfloor z-1rfloor } ((-lfloor z-1rfloor +z-1)+k)$$



                      where $lfloor zrfloor$ is the floor function on $z$ and



                      $$Gamma(z)=Gamma ((z-lfloor zrfloor )+1) Gamma_P(z)$$



                      which gives
                      $$frac{Gamma ((z-lfloor zrfloor )+1) Gamma_P(n-z) sin (pi (n+z-1))}{pi prod _{k=1}^{n-1} (z-k)}approxleft(frac{1}{Gamma(z)}right)tag{2}$$



                      with the true Gamma Function $Gamma ((z-lfloor zrfloor )+1)$ now just used in the range $1le ((z-lfloor zrfloor )+1) le 2$



                      (Note: Equation 2 is approximate, and $n$ can be set to $1$, simplifying the formula - not sure about the origin of the error here need to review this when I have time)



                      I've plotted $Gamma ((z-lfloor zrfloor )+1)$ alongside a very rough half sine wave approximation (in orange)
                      $$Gamma ((z-lfloor zrfloor )+1)approx1-left(1-frac{sqrt{pi }}{2}right) sin (pi (z-lfloor zrfloor ))$$



                      Gamma Function vs Half Sine Wave Approximation



                      Finally a comparison between the approximate inverse Gamma Function using the half sine wave approximation and the real one



                      Comparison approximate and real inverse Gamma function






                      share|cite|improve this answer











                      $endgroup$


















                        0












                        $begingroup$

                        Bear in mind in reading this that I am an engineer, and this is just a non-rigorous sketch of what you could try.



                        Assuming you are allowed to use the Gamma Function integral defined for the positive reals only, then you can use this function to calculate the "Inverse Gamma Function" for the positive reals up to any desired cut off as long as you are willing utilize and prove the identity:



                        $$sin(pi z)=frac{pi z}{Gamma(1-z)Gamma(1+z)}tag{1}$$



                        where $Gamma(z)=int_0^{infty } e^{-t} t^{z-1} , dt$ for $z>0$



                        Rearranging (1) we have



                        $$frac{z}{Gamma(1+z)}=frac{ Gamma(1-z) sin(pi z)}{pi}=left(frac{1}{Gamma(z)}right)$$



                        You will immediately say that this only works for $0<z<1$ so it is not much use for your purpose, but we can write



                        $$frac{zprod _{k=1}^{n-1} (z+k)}{Gamma(n+z)}=frac{ Gamma(n-z) sin(pi (z+n-1))}{pi prod _{k=1}^{n-1} (z-k)} =left(frac{1}{Gamma(z)}right)$$



                        where n is a positve integer $ge 1$. Therefore you can now calculate your inverse Gamma Function with $z$ in the range $0<z<n$, without worrying about how to calculate negative factorials!



                        Edit 1:
                        Lets push this a bit further and define a Pochammer Function approximation to the Gamma Function $Gamma_P$



                        $$Gamma_P(z)=prod _{k=1}^{lfloor z-1rfloor } ((-lfloor z-1rfloor +z-1)+k)$$



                        where $lfloor zrfloor$ is the floor function on $z$ and



                        $$Gamma(z)=Gamma ((z-lfloor zrfloor )+1) Gamma_P(z)$$



                        which gives
                        $$frac{Gamma ((z-lfloor zrfloor )+1) Gamma_P(n-z) sin (pi (n+z-1))}{pi prod _{k=1}^{n-1} (z-k)}approxleft(frac{1}{Gamma(z)}right)tag{2}$$



                        with the true Gamma Function $Gamma ((z-lfloor zrfloor )+1)$ now just used in the range $1le ((z-lfloor zrfloor )+1) le 2$



                        (Note: Equation 2 is approximate, and $n$ can be set to $1$, simplifying the formula - not sure about the origin of the error here need to review this when I have time)



                        I've plotted $Gamma ((z-lfloor zrfloor )+1)$ alongside a very rough half sine wave approximation (in orange)
                        $$Gamma ((z-lfloor zrfloor )+1)approx1-left(1-frac{sqrt{pi }}{2}right) sin (pi (z-lfloor zrfloor ))$$



                        Gamma Function vs Half Sine Wave Approximation



                        Finally a comparison between the approximate inverse Gamma Function using the half sine wave approximation and the real one



                        Comparison approximate and real inverse Gamma function






                        share|cite|improve this answer











                        $endgroup$
















                          0












                          0








                          0





                          $begingroup$

                          Bear in mind in reading this that I am an engineer, and this is just a non-rigorous sketch of what you could try.



                          Assuming you are allowed to use the Gamma Function integral defined for the positive reals only, then you can use this function to calculate the "Inverse Gamma Function" for the positive reals up to any desired cut off as long as you are willing utilize and prove the identity:



                          $$sin(pi z)=frac{pi z}{Gamma(1-z)Gamma(1+z)}tag{1}$$



                          where $Gamma(z)=int_0^{infty } e^{-t} t^{z-1} , dt$ for $z>0$



                          Rearranging (1) we have



                          $$frac{z}{Gamma(1+z)}=frac{ Gamma(1-z) sin(pi z)}{pi}=left(frac{1}{Gamma(z)}right)$$



                          You will immediately say that this only works for $0<z<1$ so it is not much use for your purpose, but we can write



                          $$frac{zprod _{k=1}^{n-1} (z+k)}{Gamma(n+z)}=frac{ Gamma(n-z) sin(pi (z+n-1))}{pi prod _{k=1}^{n-1} (z-k)} =left(frac{1}{Gamma(z)}right)$$



                          where n is a positve integer $ge 1$. Therefore you can now calculate your inverse Gamma Function with $z$ in the range $0<z<n$, without worrying about how to calculate negative factorials!



                          Edit 1:
                          Lets push this a bit further and define a Pochammer Function approximation to the Gamma Function $Gamma_P$



                          $$Gamma_P(z)=prod _{k=1}^{lfloor z-1rfloor } ((-lfloor z-1rfloor +z-1)+k)$$



                          where $lfloor zrfloor$ is the floor function on $z$ and



                          $$Gamma(z)=Gamma ((z-lfloor zrfloor )+1) Gamma_P(z)$$



                          which gives
                          $$frac{Gamma ((z-lfloor zrfloor )+1) Gamma_P(n-z) sin (pi (n+z-1))}{pi prod _{k=1}^{n-1} (z-k)}approxleft(frac{1}{Gamma(z)}right)tag{2}$$



                          with the true Gamma Function $Gamma ((z-lfloor zrfloor )+1)$ now just used in the range $1le ((z-lfloor zrfloor )+1) le 2$



                          (Note: Equation 2 is approximate, and $n$ can be set to $1$, simplifying the formula - not sure about the origin of the error here need to review this when I have time)



                          I've plotted $Gamma ((z-lfloor zrfloor )+1)$ alongside a very rough half sine wave approximation (in orange)
                          $$Gamma ((z-lfloor zrfloor )+1)approx1-left(1-frac{sqrt{pi }}{2}right) sin (pi (z-lfloor zrfloor ))$$



                          Gamma Function vs Half Sine Wave Approximation



                          Finally a comparison between the approximate inverse Gamma Function using the half sine wave approximation and the real one



                          Comparison approximate and real inverse Gamma function






                          share|cite|improve this answer











                          $endgroup$



                          Bear in mind in reading this that I am an engineer, and this is just a non-rigorous sketch of what you could try.



                          Assuming you are allowed to use the Gamma Function integral defined for the positive reals only, then you can use this function to calculate the "Inverse Gamma Function" for the positive reals up to any desired cut off as long as you are willing utilize and prove the identity:



                          $$sin(pi z)=frac{pi z}{Gamma(1-z)Gamma(1+z)}tag{1}$$



                          where $Gamma(z)=int_0^{infty } e^{-t} t^{z-1} , dt$ for $z>0$



                          Rearranging (1) we have



                          $$frac{z}{Gamma(1+z)}=frac{ Gamma(1-z) sin(pi z)}{pi}=left(frac{1}{Gamma(z)}right)$$



                          You will immediately say that this only works for $0<z<1$ so it is not much use for your purpose, but we can write



                          $$frac{zprod _{k=1}^{n-1} (z+k)}{Gamma(n+z)}=frac{ Gamma(n-z) sin(pi (z+n-1))}{pi prod _{k=1}^{n-1} (z-k)} =left(frac{1}{Gamma(z)}right)$$



                          where n is a positve integer $ge 1$. Therefore you can now calculate your inverse Gamma Function with $z$ in the range $0<z<n$, without worrying about how to calculate negative factorials!



                          Edit 1:
                          Lets push this a bit further and define a Pochammer Function approximation to the Gamma Function $Gamma_P$



                          $$Gamma_P(z)=prod _{k=1}^{lfloor z-1rfloor } ((-lfloor z-1rfloor +z-1)+k)$$



                          where $lfloor zrfloor$ is the floor function on $z$ and



                          $$Gamma(z)=Gamma ((z-lfloor zrfloor )+1) Gamma_P(z)$$



                          which gives
                          $$frac{Gamma ((z-lfloor zrfloor )+1) Gamma_P(n-z) sin (pi (n+z-1))}{pi prod _{k=1}^{n-1} (z-k)}approxleft(frac{1}{Gamma(z)}right)tag{2}$$



                          with the true Gamma Function $Gamma ((z-lfloor zrfloor )+1)$ now just used in the range $1le ((z-lfloor zrfloor )+1) le 2$



                          (Note: Equation 2 is approximate, and $n$ can be set to $1$, simplifying the formula - not sure about the origin of the error here need to review this when I have time)



                          I've plotted $Gamma ((z-lfloor zrfloor )+1)$ alongside a very rough half sine wave approximation (in orange)
                          $$Gamma ((z-lfloor zrfloor )+1)approx1-left(1-frac{sqrt{pi }}{2}right) sin (pi (z-lfloor zrfloor ))$$



                          Gamma Function vs Half Sine Wave Approximation



                          Finally a comparison between the approximate inverse Gamma Function using the half sine wave approximation and the real one



                          Comparison approximate and real inverse Gamma function







                          share|cite|improve this answer














                          share|cite|improve this answer



                          share|cite|improve this answer








                          edited Feb 2 at 11:14

























                          answered Feb 1 at 0:35









                          James ArathoonJames Arathoon

                          1,588423




                          1,588423






























                              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%2f3095461%2ffinding-an-inverse-of-restricted-gamma-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

                              MongoDB - Not Authorized To Execute Command

                              Npm cannot find a required file even through it is in the searched directory

                              in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith