double integtation ivolving exponential functions

i have an exponential function with 2 variables. how to double integrate this function. the equation is given below

12 Comments

Why this part is not under integral
all the exponential part after the integral comes under integration including this part
Did you try integral2?
yes,it doesn't work with 2 variable exponential
integral2(@(x,y) exp(-(x.^2 + y.^2)./W.^2), -inf, inf, -inf, inf)
Appears to work for me. Are you saying that it is producing the wrong numeric result?
syms x y w real
int(int(exp(-(x.^2 + y.^2)./w.^2), -inf, inf), -inf, inf)
ans =
pi*w^2
So you can remove the integral and replace it with that formula.
Hello Walter,
I don't believe it's quite that simple. The only way this expression makes sense is if dx and dy are inside of the absolute value expression
| double integral (stuff) dxdy |^2
so it's not taking the absolute value of the integrand. Assume for simplicity that x' = y' = 0, that delta_phi = 0, that 1/w^2 = a and k/2R = b. The sym engine can't seem to deal with the double integral which is kind of disappointing, but the integrand is factorable into the product of functions of x and y, and syms can handle each 1d integral.
syms x
syms a b real positive
abs( int(exp(-a*(x^2)), -inf, inf) )^2
ans = pi/a
abs( int(exp(-a*(x^2))*exp(b*i*(x^2)),-inf, inf) )^2
ans = pi/(a^2 + b^2)^(1/2)
The complex oscillations matter.
I disagree, David.
Integral limitsx dx Integral limitsy dy f(x, y)
by commutivity is
Integral limitsx dx Integral limitsy f(x, y) dy
And commutivity again along with independence of x and y says that is the more commonly seen
Integral limitsx Integral limitsy f(x, y) dy dx
This can then be calculated the way I showed provided that f(x, y) is real valued. We are not given any information about omega so we cannot say that for sure, but I note that your proposed solution assumes that omega is real valued.
We do not need to care that there is an absolute value around the integral because we are not asked to take the integral of the absolute value.
The only time my solution would not work would be if the last two × symbols are considered to be within the double integral. I cannot rule that out, but it would be inconsistent with the way the expression uses placement adjacent to indicate multiplication and uses brackets and braces to disambiguate otherwise. I believe that each of the terms surrounded by × is intended to be implicitly () that the × marks the end of the term, so the end of the integral.
Yes this does imply that the overall expression would end up with unbound x and y. I do agree that if the integral were extended to include the two × terms that the x and y would be resolved, but I think the idea that each × ends its term is a valid interpretation... while recognizing that there might be external information mandating a different interpretation.
In any case, the absolute value is outside of the integrals not inside it. The absolute value starts before the U0 which is decidedly outside of the integral
HI Walter, the the expression with the ×'s extended looks like a Fresnel diffraction expression of some kind for a light beam with a Gaussian profile. Also it does not make much sense to write an expression like that if it immediately collapses. So the OP should know.
Titu, could you show where the dx dy is placed in this expression, and provide some context for where the equation comes from?
Yes the expression corresponds to a Fraunhofer approximation of Fresnel–Kirchhoff diffraction integral. The expression represents the far-field intensity profile of the laser beam at the output detector plane.
Hi Titu,
Due to the form of the last exponential factor, one standard way to do this is by fft2 in x and y, with conjugate variables x' and y'. Here the x and y arrays are extended far enough in either direction so that the exp(-(x^2+y^2)/w^2) = G factor gets really small, and you hope that the wicked exp(-ik*(x^2+y^2)/2R) oscillation gets wiped out by G before it has a chance to really get going. Also of course the Dphi(x,y,t) term can't be too crazy. t is just a parameter, so there does not seem to be an obvious way to avoid having to do the integral for every t.
Could you explain what w (omega) corresponds to?
Hi David,
w(omega) corresponds to the beam radius (for me w=0.35mm). In the expresion w,d,lambda,k,alpha,L,R etc are known values

Sign in to comment.

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Asked:

on 6 Mar 2020

Commented:

on 10 Mar 2020

Community Treasure Hunt

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

Start Hunting!