Who was the first person who solved the problem of extending the factorial to non-integer arguments? 


Detlef Gronau writes [1]: "As a matter of fact, it was Daniel Bernoulli who gave in 1729 the first representation of an interpolating function of the factorials in form of an infinite product, later known as gamma function."


On the other hand many other places say it was Leonhard Euler. Will the real inventor please stand up? 


[1] "Why is the gamma function so as it is?" by Detlef Gronau, Teaching Mathematics and Computer Science, 1/1 (2003), 43-53.



Who invented the gamma function?
I don't have a complete answer. As you say, many sources say that Euler did it, but Gronau gives compelling reason to doubt this. The best source I have found for this issue is ["The early history of the factorial function" by Dutka](https://doi.org/10.1007/BF00389433), and for what it's worth I am convinced that Gronau's assessment is a fair one.


First, I'll summarize the usual story. Kline discusses this in chapter 19, section 5 of *Mathematical Thought from Ancient to Modern Times* (which falls in volume 2 of the paperback printing), and a more thorough source is Davis's article "[Leonhard Euler's Integral: A Historical Profile of the Gamma Function](https://www.jstor.org/stable/2309786)". There is agreement in these sources that Euler solved the problem after unsuccessful attempts by Stirling, D. Bernoulli, and Goldbach, and that the first record of Euler's solution appears in outline form in a 1729 letter from Euler to Goldbach. This was expanded in subsequent letters and written up in the [article](http://math.dartmouth.edu/%7Eeuler/pages/E019.html) to which Kristal Cantwell links (apparently the article was written in 1729 but not published until 1738). Euler's letters to Goldbach start on the third page of [this pdf](http://math.dartmouth.edu/%7Eeuler/correspondence/fuss/goldbach1-59).


However, Gronau cites a letter by Bernoulli that was written a few days before Euler's and that contains at least a partial solution, possibly contradicting Kline and Davis. Dutka's paper goes into more detail and also claims that Euler's work was influenced by Bernoulli's earlier solution. I could only speculate on what led to the confusion among other authors, and I won't do so here. Perhaps it should be mentioned here (as is done by Gronau and Dutka) that Euler did much more than Bernoulli. For instance, Euler gave the first integral representations of the gamma function.


**Edit:** Because this answer is accepted and yet incomplete, I want to direct attention to Bruce Arnold's answer below. It contains a link to a copy of the too often neglected letter of D. Bernoulli cited by Gronau and Dutka.


