- #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.
∫∫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.