Warning: Explicit integral could not be found. I got this warning while integrating a function.
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
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 comentarios
Star Strider
el 30 de Mayo de 2016
Use numeric integration instead.
Walter Roberson
el 30 de Mayo de 2016
Editada: Walter Roberson
el 30 de Mayo de 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 ?
Respuestas (1)
John D'Errico
el 30 de Mayo de 2016
Editada: John D'Errico
el 30 de Mayo de 2016
0 votos
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.
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!