matlab integration using function

1 次查看(过去 30 天)
can i integrate this in matlab
integration of x^b/((1+x^b)^2) from 0 to infinity
  1 个评论
Walter Roberson
Walter Roberson 2020-7-21
integral() with anonymous function that uses vectorized operations such as ./ and .^

请先登录,再进行评论。

回答(1 个)

John D'Errico
John D'Errico 2020-7-21
编辑:John D'Errico 2020-7-21
Um, no. And, yes. Sort of. Is that a good, definiitive answer? Depending on the value of b, this has a solution, or no solution at all.
Pick some fixed value of b. Say b == 2.
b = 2;
syms x
int(x^b/(1+x^b)^2,0,inf)
ans =
pi/4
Larger values of b yield a little less clean solutions.
b = 3;
int(x^b/(1+x^b)^2,0,inf)
ans =
(2*pi*3^(1/2))/27
b = 4;
int(x^b/(1+x^b)^2,0,inf)
ans =
(2^(1/2)*(4*pi - log(- 1/2 - 1i/2)*(1 + 1i) - log(- 1/2 + 1i/2)*(1 - 1i) + log(1/2 - 1i/2)*(1 - 1i) + log(1/2 + 1i/2)*(1 + 1i)))/32
vpa(ans)
ans =
0.27768018363489789
As you can see, when b == 4, I had to resort to just computing the numerical value itself to give a clean, simple looking result.
But when b == 1,
b = 1;
int(x^b/(1+x^b)^2,0,inf)
ans =
Inf
Here we see a problem arises. With a little thought you can even see whay this fails when b == 1.
For general b>1, the integral is not some simple function of b. For b <= 1, a solution does not exist.
And if your question would be, when b > 1, is there some simply written algebraic function of b that provides a general solution, the answer seems to be no. You could define this as a special function, give it a name, tablulate values, etc. For b > 1, the problem is well-posed. But that is about as much as you could do.
So, can you form the integral? Well yes and no. Sort of.

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by