verification of an integral

1 回表示 (過去 30 日間)
tx213
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:
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 Center および File ExchangeNumerical 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