Integration with one variable and many constants

13 visualizzazioni (ultimi 30 giorni)
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 Commenti
Abdurrahman M
Abdurrahman M il 20 Ott 2016
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 il 20 Ott 2016
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.

Accedi per commentare.

Risposta accettata

Mischa Kim
Mischa Kim il 20 Ott 2016
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 Commento
Abdurrahman M
Abdurrahman M il 20 Ott 2016
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.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by