explicit integral could not be found

1 visualización (últimos 30 días)
Peter
Peter el 15 de Mzo. de 2014
Comentada: Roger Stafford el 16 de Mzo. de 2014
Hi,
I am trying to calculate some statistics using Matlab and I have almost completed it. All i need now is to calculate 1 number which will come from an integral. However the message Explicit integral cannot be found keeps coming up. here is my code:
syms x C;
double(int((x^1.7653)* ((1-x)^3.0546-1), x, C))
I have also used the same code but without the double() and still the same answer. Any help would be enormously appreciated. Thanks.

Respuestas (3)

Roger Stafford
Roger Stafford el 15 de Mzo. de 2014
In the integrand, do you mean
(x^1.7653)* ((1-x)^3.0546-1) (Case 1)
or do you mean
(x^1.7653)* (1-x)^(3.0546-1) ? (Case 2)
In either case, matlab can give you the numerical value of the integral directly using its 'betacdf' function in the Statistics Toolbox. As you have seen, the 'int' function is unable to supply an explicit expression. That can easily happen.
It isn't clear what your integration limits are. I will suppose you want to integrate from x = 0 to x = c for some arbitrary parameter c with 0<=c<=1.
In Case 1 the integrand can be expressed as:
x^1.7653*(1-x)^3.0546 - x^1.7653
and its integral would be
gamma(a)*gamma(b)/gamma(a+b)*betacdf(c,a,b) - c^a/a
where a = 1.7653+1 and b = 3.0546+1.
In Case 2 its integral is:
gamma(a)*gamma(b)/gamma(a+b)*betacdf(c,a,b)
where a = 1.7653+1 and b = 3.0546.
If your integration limits are different from the above, the above can easily be modified to give the correct answer. Just let us know what those limits actually are.

Walter Roberson
Walter Roberson el 15 de Mzo. de 2014
Editada: Walter Roberson el 15 de Mzo. de 2014
Are you intending to integrate over x = x to C ? Your form is a bit ambiguous about the limits.
Even without that you simply have the problem that it is difficult to find a closed form solution for the integral.
Perhaps it would be within your accuracy requirements to convert the exponents to rational, taylor that, and integrate the result?

Peter
Peter el 16 de Mzo. de 2014
It was case 1 Roger and what i was wanting to do was find a value for C cause I already knew the result of the integral. I found out how to do this though, it is an incomplete beta function which matalb has a function for.
betainc(X,W,Z)
where W and Z are the constants above. I then kept changing the values of X till i got the result I was looking for.
Thanks for all your time and effort.
  1 comentario
Roger Stafford
Roger Stafford el 16 de Mzo. de 2014
The 'betainc' and 'betacdf' functions give the same result.
Do you agree with the term c^a/a to be subtracted in your integral?
You could have used 'fzero' to do the searching for the correct value for c.

Iniciar sesión para comentar.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by