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 CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by