HP Forums

Full Version: Gamma function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
For example: laplace(t^(-1/3),t,s) -->
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.
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.
Reference URL's