explicit integral could not be found
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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.
0 comentarios
Respuestas (3)
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.
0 comentarios
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?
0 comentarios
Peter
el 16 de Mzo. de 2014
1 comentario
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.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!