verification of an integral

조회 수: 4 (최근 30일)
tx213 . 2014년 1월 22일
답변: tx213 . 2014년 1월 22일
Hi guys, I've been stuck on a problem and would some insight from you guys. Any insight and suggestions would be really appreciated, thanks in advance.
Above is a field map of sorts, and within the annulus ring are nonzero values. Inside and outside of that are null.
I have the closed form equations which govern this field pattern. Let's call this F(r,phi). From that I've obtained the numerical solution to this integral. I take a double integral: first, integral(F,(r,r_inner,r_outter)) followed by integral(ans,(phi,0,2*pi)). No problem.
What I want to do is to verify this solution. So, I sum all the values in the figure and scale it by the unit square. I used [x y]=meshgrid(-50,0.03,50) to create this 3334x3334 2D array, so unit square is 0.03^2.
The two values don't match, and I can't seem to find where I went wrong.

채택된 답변

Roger Stafford
Roger Stafford 2014년 1월 22일
Here is my guess as to the problem. In your first integral with respect to r you don't indicate that you included the Jacobian that will be necessary in conversion to polar coordinates. In this case it is just r. That is, in differential notation dx*dy = r*dr*dphi. You want the double integral of:
with respect to r and phi within the limits you have described for the annulus. With the units I see in your picture that would make an enormous difference.
It was not entirely clear how you handled the meshgrid values x and y as a check. Perhaps you could explain this more clearly if the above is not the problem. You are bound to have some error in this method because of the numerous little squares that fall partly inside and partly outside the annulus. You haven't stated how large the discrepancy is between your two methods.

추가 답변 (1개)

tx213 2014년 1월 22일


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