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 comentarios

Use numeric integration instead.
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
John D'Errico el 30 de Mayo de 2016
Editada: John D'Errico el 30 de Mayo de 2016
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.

Preguntada:

el 30 de Mayo de 2016

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by