HP Forums
Gamma function - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Gamma function (/thread-15436.html)



Gamma function - robmio - 08-06-2020 01:56 PM

Hello everyone, I would like to know how to replace "Gamma(a,0)" and "Gamma(a,infinity)" ("a" equal, for example, to 2, or to 1/5, etc.) with "gamma(a)" and with "0" , respectively.
For example the following approach does not work:

"subst(Gamma (2/3,0), Gamma (a,0), Gamma(a))".

How can I do?
Sincerely, robmio


RE: Gamma function - robmio - 08-06-2020 03:49 PM

For example: laplace(t^(-1/3),t,s) -->
(-s*Gamma(2/3,infinity)+s*Gamma(2/3,0))/(s*(s^(2/3))).


RE: Gamma function - Major - 08-06-2020 05:17 PM

From what I see the Gamma function only takes one argument unless I am missing something.

EDIT: Oh I see it outputs that as an answer

I know you can change the expression to a string (STRING) and use the replace (REPLACE) command, but afterwards I am unsure because I do not know how to convert the string back to an expression.

There may or may not be a function to change a string into an unsolved expression, but I can't find it. Hopefully someone can help you.

But if you want to solve it you can use EXPR.


RE: Gamma function - robmio - 08-06-2020 06:14 PM

In HP PRIME, Gamma function can take one argument as "complete" gamma function, or 2 arguments as incomplete gamma function:

Gamma(a) = Gamma(a,0) = int(t^(a-1)*exp(-t),t,0,infinity)

Gamma(a,x) = int(t^(a-1)*exp(-t),t,x,infinity).

In HP PRIME, for example, Gamma(0.5,0) = 1.7724
Gamma(0.5,2) = 0.080647.