verification of an integral

1 次查看(过去 30 天)
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:
r*F(r,phi)
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
tx213 2014-1-22
thanks!

类别

Help CenterFile Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by