Integration with one variable and many constants

1 次查看(过去 30 天)
Hello,
I have a problem where I would like to inegrate this function:
f(x) = exp(-g*(a-x)^2)./(((x-b).^2+c^2).*((x-d).^2+e^2));
where a,b,c,d,e,g are constants, and the variable is x.
My attempt was:
syms a b c d e g x real
f = exp(-g*(a-x)^2)/(((x-b)^2+c^2)*((x-d)^2+e^2)); Q = int(f,0,inf)
But it just returns:
Q =
int(exp(-g*(a - x)^2)/((c^2 + (b - x)^2)*(e^2 + (d - x)^2)), x, 0, Inf).
I don't know what I'm doing wrong, and whether or not my solution even converges or not, because I tried this with Mathematica and it doesn't give me an output either. I've even tried to modify the function to:
f = (a-x)*exp(-g*(a-x)^2)/(((x-b)^2+c^2)*((x-d)^2+e^2));
But even that doesn't work. Any help would be greatly appreciated.
  2 个评论
Abdurrahman M
Abdurrahman M 2016-10-20
I have even tried this:
syms a b c d e g x real
f = @(x) (a-x)*exp(-g*(a-x)^2)/(((x-b)^2+c^2)*((x-d)^2+e^2)); Q = integral(f,0,inf)
But I get a lot of errors
Abdurrahman M
Abdurrahman M 2016-10-20
I've simplified the function by putting in the constants:
f(x,y)=g(x)*exp(-1.02*(1-y)^2)/(((y-x)^2+1.05)*((y-x+3351)^2+0.0841))
In my case, g(x) is a two column vector.
Where I have to integrate with respect to x and y from 0 infinity.

请先登录,再进行评论。

采纳的回答

Mischa Kim
Mischa Kim 2016-10-20
Abdurrahman, there is no closed-form solution that MATLAB (and Mathematica) can compute. That is why you get int() term as a result.
So in other words, you would have to integrate numerically and for that you need numeric values for your constants.
  1 个评论
Abdurrahman M
Abdurrahman M 2016-10-20
The problem is that after I integrate with respect to x, I have to then integrate the resulting function with respect to y, of which the constants c(y) and d(y) are functions of, which I have not written explicitely.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by