Numerical Integration of Double integrals

Click For Summary

Discussion Overview

The discussion revolves around the numerical integration of a double integral, specifically the integral of the function sin²(πx/A)sin²(πy/B) over specified ranges. Participants explore the application of the trapezoidal rule for this integration and raise questions regarding the units of the results obtained from numerical integration compared to analytical integration.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant presents a double integral and describes their numerical integration approach using the trapezoidal rule, expressing uncertainty about the correctness of their method.
  • Another participant questions the dimensionality of the function ψ(x) in relation to its integration, suggesting that the unit of the integral depends on how one interprets the dimensions of ψ.
  • Further contributions clarify that if ψ is considered to have a length dimension, the integral would yield a result with length squared dimensions, while if it does not, the integral may not represent an area.
  • A participant illustrates that the numerical integration of a polynomial function (x³) leads to a result with units of length to the fourth power, indicating a potential misunderstanding of dimensional analysis in integration.
  • One participant reiterates their uncertainty about the correctness of their numerical integration method for the double integral.

Areas of Agreement / Disagreement

Participants express differing views on the dimensionality of integrals and the interpretation of units in numerical integration. There is no consensus on the correctness of the numerical integration method employed by the initial poster.

Contextual Notes

Participants discuss the implications of dimensional analysis in the context of integration, highlighting that the interpretation of units can vary based on the definitions and assumptions made about the functions involved.

ruzfactor
Messages
80
Reaction score
0
I have a double integral:
∫∫sin^2(∏x/A)*sin^2(∏y/B)dxdy

A=length along x
B=length along y

ranges: 0 to A(for x) & 0 to B (for y)

Analytical result is: A*B/4 (unit^2)

Now, I want to evaulate it numerically using trapezoidal rule. Infact, I have done it but not sure whether it is a right procedure although got the same result as analytical. Here is what I did:

for integrating wrt x I chose y=B and x=0 to A (with an interval Δx)

evaluated the different values of the function for different x values. Then applied the trapezoidal rule using the evaluated values of the function and x. Got a result A/2 (unit).
Similar thing I did only this time x=A and y=0 to B (with Δy interval). Got result B/2 (unit).

Combining this two results gives me the same result as the analytical one. Is this a right way to do numerical integration of a double integral?

Another question that is bugging me is the unit of the result of a numerical integration. It might sound stupid to most of you but this has been confusing me for the last few days.

As we all know integration of a function is the area under the curve of that function. Now if a numerical integration technique is applied on that area, I would get the result of the intergation within its limits. Now what would be the unit this case? unit^2?

Then why the function above if integrated wrt x or y produces a result whose unit is just the unit (e.g. m)? This is where it is confusing. In some examples I have seen, if the unit is not in say m then the whole result becomes inconsistent.

For example
∫ψ(x)dx if integrated analytically in 0 to L range the result is L (m). Same found from numerical integration. If the integration is simply the area under the curve, then the unit should have been m^2 when doing numerically. This is where I have been arguing with someone. I hope someone would explain this stupid argument. Thanks.
 
Physics news on Phys.org
ruzfactor said:
∫ψ(x)dx if integrated analytically in 0 to L range the result is L (m). /QUOTE]
It depends what dimension you think psi has. If consider you are calculating an area then psi also has length dimension, so the integral has dimension length squared.
 
Please see the attached for the function psi.
 

Attachments

  • psi.jpg
    psi.jpg
    5.6 KB · Views: 472
ruzfactor said:
Please see the attached for the function psi.
What the function is algebraically is irrelevant. What matters for your question is whether you regard it has having a length dimension. If you do, the integral will have dimension length squared (I'm assuming x has length dimension). If you don't then the integral is not computing an area - it only seems like an area because you drew it as a graph ( thereby giving psi length dimension).
 
so the unit would depend on the unit I am considering for the function. Although the integral is not computing an area but the integral is found from the area of the curve drawn from the function along its limits numerically.

e.g. ∫x^3dx= x^4/4 [m^4] (limit say 0 to 5)

So I can evaluate it numerically by plotting a curve and computing the area under the curve within limits. I hope I am not pushing things further! :S
 
Is my way of doing the double integration correct using the trapezoidal rule?
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 27 ·
Replies
27
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 31 ·
2
Replies
31
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K