Warning: Explicit integral could not be found. I got this warning while integrating a function.
Info
This question is closed. Reopen it to edit or answer.
Show older comments
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 Comments
Star Strider
on 30 May 2016
Use numeric integration instead.
Walter Roberson
on 30 May 2016
Edited: Walter Roberson
on 30 May 2016
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 ?
Answers (1)
John D'Errico
on 30 May 2016
Edited: John D'Errico
on 30 May 2016
0 votes
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.
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!