Numerical Integration of Double integrals

In summary, the conversation discusses a double integral and its analytical result, as well as the use of the trapezoidal rule for numerical evaluation. The question of the unit of the result of a numerical integration is also raised and explained, with the conclusion that it depends on the dimension of the function being integrated. The conversation also touches on the correct procedure for numerical integration and confirms that the use of the trapezoidal rule is appropriate.
  • #1
ruzfactor
82
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
  • #2
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.
 
  • #3
Please see the attached for the function psi.
 

Attachments

  • psi.jpg
    psi.jpg
    5.6 KB · Views: 393
  • #4
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).
 
  • #5
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
 
  • #6
Is my way of doing the double integration correct using the trapezoidal rule?
 

1. What is numerical integration of double integrals?

Numerical integration of double integrals is a method used to approximate the value of a double integral, which is a type of mathematical calculation that involves finding the area under a two-dimensional curved surface. It involves breaking down the integral into smaller, simpler parts and using numerical techniques to calculate the sum of these parts.

2. Why is numerical integration of double integrals important?

Numerical integration of double integrals is important because it allows us to approximate the value of an integral when an exact solution is not possible or feasible. It is also useful in situations where the integral is too complicated to be solved analytically. Many real-world problems in fields such as physics, engineering, and economics can be solved using numerical integration of double integrals.

3. What are some common numerical methods used for double integral approximation?

Some common numerical methods used for double integral approximation include the trapezoidal rule, Simpson's rule, and Gaussian quadrature. These methods involve dividing the integral into smaller subintervals and using different techniques to approximate the value of each subinterval. The accuracy of the approximation depends on the number of subintervals used.

4. What factors can affect the accuracy of numerical integration of double integrals?

The accuracy of numerical integration of double integrals can be affected by the choice of integration method, the number of subintervals used, and the complexity of the integrand. Using a higher number of subintervals generally leads to a more accurate approximation, but it also increases the computational time. In addition, the presence of singularities or sharp peaks in the integrand can also affect the accuracy of the approximation.

5. How can I check the accuracy of my numerical integration of double integrals results?

There are several ways to check the accuracy of numerical integration of double integrals results. One method is to compare the results obtained using different integration methods and with varying numbers of subintervals. Another method is to compare the numerical results with an exact solution, if one is available. Additionally, some integration methods have built-in error estimation techniques that can provide an estimate of the accuracy of the approximation.

Similar threads

Replies
20
Views
2K
Replies
12
Views
1K
Replies
8
Views
421
Replies
2
Views
286
Replies
31
Views
919
Replies
2
Views
2K
  • Calculus
Replies
6
Views
1K
Replies
1
Views
2K
Replies
14
Views
1K
Replies
8
Views
303
Back
Top