Integration with one variable and many constants

13 ビュー (過去 30 日間)
Abdurrahman M
Abdurrahman M 2016 年 10 月 20 日
コメント済み: Abdurrahman M 2016 年 10 月 20 日
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 Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by