explicit integral could not be found
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (3 件)
Roger Stafford
2014 年 3 月 15 日
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 件のコメント
Walter Roberson
2014 年 3 月 15 日
編集済み: Walter Roberson
2014 年 3 月 15 日
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 件のコメント
Peter
2014 年 3 月 16 日
1 件のコメント
Roger Stafford
2014 年 3 月 16 日
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.
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!