Warning: Explicit integral could not be found. I got this warning while integrating a function.

function y2 = Fw(t)
p = 0.5
num_gamma= gamma(3/p);
den_gamma= gamma(1/p);
global a;
a=(p/2)*(((num_gamma)^(1/2))/((den_gamma)^(3/2)));
global b;
b=(num_gamma/den_gamma)^(p/2);
syms u;
y2 = int(a*exp(-b*((abs(u))^p)),u,(-inf),t);
end
---------------
On calling the function Fw(t), I'm getting the warning that "Explicit integral could not be found."
And the solution is some complex equation in terms of t.
help me out

2 件のコメント

Star Strider
Star Strider 2016 年 5 月 30 日
Use numeric integration instead.
Walter Roberson
Walter Roberson 2016 年 5 月 30 日
編集済み: Walter Roberson 2016 年 5 月 30 日
Is there additional information about the valid range of p? In particular is p in the range 0 to 1? If so, can it exactly equal 0 or 1?
Also, is it possible that t < 0 ?

回答 (1 件)

John D'Errico
John D'Errico 2016 年 5 月 30 日
編集済み: John D'Errico 2016 年 5 月 30 日
I imagine people think computers are all-powerful. After all, they seem to be so in the movies, the TV shows. Computers can do anything, with two keystrokes, all in a millisecond. Wrong. Unless you happen to work on one of those TV shows. In fact, it is trivial to write a problems that has no analytical solution, or a problem that will take a virtually infinite amount of time to solve.
"Explicit integral could not be found" is a hint there. So while it is possible a solution does exist, there is a good chance one does not exist.
The solution is to use numerical integration, so integral, or one of the quad tools. You need to be careful there of course, as it is equally easy to trip up a numerical integration tool.
By the way, there was no need to define a and b as global variables. You were just wasting CPU cycles.

この質問は閉じられています。

質問済み:

2016 年 5 月 30 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by