In calculus, double integrals are used to calculate the volume under a surface or the area of a region in the plane. They extend the concept of single integrals to functions of two variables. This article will delve into the evaluation of a specific double integral both analytically and numerically, comparing the results obtained through different numerical methods. The integral we will be evaluating is:
I=∫−22​∫04​(x2−3y2+xy3)dxdy
We will first find the exact solution using analytical methods. Then, we will employ numerical techniques such as the multiple application trapezoidal rule and Simpson's 1/3 rule to approximate the integral's value. Finally, we will compare the results obtained from each method and discuss their accuracy and efficiency.
To analytically evaluate the double integral, we will perform the integration step by step. First, we integrate with respect to x, treating y as a constant, and then we integrate the result with respect to y.
I=∫−22​[∫04​(x2−3y2+xy3)dx]dy
Let's evaluate the inner integral:
∫04​(x2−3y2+xy3)dx=[3x3​−3y2x+2x2y3​]04​
Substitute the limits of integration:
=(343​−3y2(4)+242y3​)−(303​−3y2(0)+202y3​)
=364​−12y2+8y3
Now, we integrate this expression with respect to y:
I=∫−22​(364​−12y2+8y3)dy
=[364​y−4y3+2y4]−22​
Substitute the limits of integration:
=(364​(2)−4(2)3+2(2)4)−(364​(−2)−4(−2)3+2(−2)4)
=(3128​−32+32)−(−3128​+32+32)
=3128​+3128​−64
=3256​−64
=3256−192​
=364​
Thus, the analytical solution of the double integral is 364​≈21.333.
The trapezoidal rule is a numerical integration technique that approximates the definite integral by dividing the area under the curve into trapezoids. The multiple application trapezoidal rule extends this by dividing the interval into multiple subintervals and applying the trapezoidal rule to each. For a double integral, we apply the trapezoidal rule first to the inner integral and then to the outer integral.
The formula for the multiple application trapezoidal rule is:
∫ab​f(x)dx≈2h​[f(x0​)+2∑i=1n−1​f(xi​)+f(xn​)]
Where:
- h=nb−a​ is the width of each subinterval.
- n is the number of subintervals.
- xi​=a+ih are the points at which the function is evaluated.
Let's apply the trapezoidal rule to our double integral:
I=∫−22​∫04​(x2−3y2+xy3)dxdy
First, we integrate with respect to x. Let's divide the interval [0,4] into nx​=4 subintervals. Thus, hx​=44−0​=1.
The points are x0​=0, x1​=1, x2​=2, x3​=3, x4​=4.
Applying the trapezoidal rule for the inner integral:
∫04​(x2−3y2+xy3)dx≈21​[f(0,y)+2(f(1,y)+f(2,y)+f(3,y))+f(4,y)]
Where f(x,y)=x2−3y2+xy3.
Let's calculate the values:
- f(0,y)=02−3y2+0y3=−3y2
- f(1,y)=12−3y2+1y3=1−3y2+y3
- f(2,y)=22−3y2+2y3=4−3y2+2y3
- f(3,y)=32−3y2+3y3=9−3y2+3y3
- f(4,y)=42−3y2+4y3=16−3y2+4y3
Substitute these values into the trapezoidal rule formula:
≈21​[−3y2+2(1−3y2+y3+4−3y2+2y3+9−3y2+3y3)+16−3y2+4y3]
=21​[−3y2+2(14−9y2+6y3)+16−3y2+4y3]
=21​[−3y2+28−18y2+12y3+16−3y2+4y3]
=21​[44−24y2+16y3]
=22−12y2+8y3
Now, we integrate this expression with respect to y using the trapezoidal rule. Let's divide the interval [−2,2] into ny​=4 subintervals. Thus, hy​=42−(−2)​=1.
The points are y0​=−2, y1​=−1, y2​=0, y3​=1, y4​=2.
Let g(y)=22−12y2+8y3.
Applying the trapezoidal rule for the outer integral:
∫−22​(22−12y2+8y3)dy≈21​[g(−2)+2(g(−1)+g(0)+g(1))+g(2)]
Let's calculate the values:
- g(−2)=22−12(−2)2+8(−2)3=22−48−64=−90
- g(−1)=22−12(−1)2+8(−1)3=22−12−8=2
- g(0)=22−12(0)2+8(0)3=22
- g(1)=22−12(1)2+8(1)3=22−12+8=18
- g(2)=22−12(2)2+8(2)3=22−48+64=38
Substitute these values into the trapezoidal rule formula:
≈21​[−90+2(2+22+18)+38]
=21​[−90+2(42)+38]
=21​[−90+84+38]
=21​[32]
=16
Thus, the numerical approximation using the multiple application trapezoidal rule is 16.
Simpson's 1/3 rule is another numerical integration technique that provides a more accurate approximation than the trapezoidal rule by using quadratic polynomials to approximate the function. For a double integral, we apply Simpson's 1/3 rule first to the inner integral and then to the outer integral.
The formula for Simpson's 1/3 rule is:
∫ab​f(x)dx≈3h​[f(x0​)+4∑i=1,3,5,...n−1​f(xi​)+2∑i=2,4,6,...n−2​f(xi​)+f(xn​)]
Where:
- h=nb−a​ is the width of each subinterval.
- n is the number of subintervals (must be even).
- xi​=a+ih are the points at which the function is evaluated.
Let's apply Simpson's 1/3 rule to our double integral:
I=∫−22​∫04​(x2−3y2+xy3)dxdy
First, we integrate with respect to x. Let's divide the interval [0,4] into nx​=4 subintervals. Thus, hx​=44−0​=1.
The points are x0​=0, x1​=1, x2​=2, x3​=3, x4​=4.
Applying Simpson's 1/3 rule for the inner integral:
∫04​(x2−3y2+xy3)dx≈31​[f(0,y)+4(f(1,y)+f(3,y))+2f(2,y)+f(4,y)]
Where f(x,y)=x2−3y2+xy3.
Let's calculate the values (we already computed these in the trapezoidal rule section):
- f(0,y)=−3y2
- f(1,y)=1−3y2+y3
- f(2,y)=4−3y2+2y3
- f(3,y)=9−3y2+3y3
- f(4,y)=16−3y2+4y3
Substitute these values into Simpson's 1/3 rule formula:
≈31​[−3y2+4(1−3y2+y3+9−3y2+3y3)+2(4−3y2+2y3)+16−3y2+4y3]
=31​[−3y2+4(10−6y2+4y3)+8−6y2+4y3+16−3y2+4y3]
=31​[−3y2+40−24y2+16y3+8−6y2+4y3+16−3y2+4y3]
=31​[64−36y2+24y3]
Now, we integrate this expression with respect to y using Simpson's 1/3 rule. Let's divide the interval [−2,2] into ny​=4 subintervals. Thus, hy​=42−(−2)​=1.
The points are y0​=−2, y1​=−1, y2​=0, y3​=1, y4​=2.
Let g(y)=31​(64−36y2+24y3).
Applying Simpson's 1/3 rule for the outer integral:
∫−22​31​(64−36y2+24y3)dy≈31​[g(−2)+4(g(−1)+g(1))+2g(0)+g(2)]
Let's calculate the values:
- g(−2)=31​(64−36(−2)2+24(−2)3)=31​(64−144−192)=31​(−272)
- g(−1)=31​(64−36(−1)2+24(−1)3)=31​(64−36−24)=31​(4)
- g(0)=31​(64−36(0)2+24(0)3)=31​(64)
- g(1)=31​(64−36(1)2+24(1)3)=31​(64−36+24)=31​(52)
- g(2)=31​(64−36(2)2+24(2)3)=31​(64−144+192)=31​(112)
Substitute these values into Simpson's 1/3 rule formula:
≈31​[3−272​+4(34​+352​)+2(364​)+3112​]
=91​[−272+4(56)+128+112]
=91​[−272+224+128+112]
=91​[192]
=364​
Thus, the numerical approximation using Simpson's 1/3 rule is 364​≈21.333.
Let's compare the results we obtained from each method:
- Analytical Solution: 364​≈21.333
- Multiple Application Trapezoidal Rule: 16
- Simpson's 1/3 Rule: 364​≈21.333
Discussion
-
Analytical Solution: The analytical method provides the exact value of the double integral. It involves symbolic integration, which can be complex and time-consuming for more complicated functions. However, it gives a precise result, serving as a benchmark for numerical methods.
-
Multiple Application Trapezoidal Rule: The trapezoidal rule provides an approximation of the integral. In our case, it gave a result of 16, which is significantly different from the exact solution. The trapezoidal rule is a first-order numerical integration technique, and its accuracy improves with an increasing number of subintervals (n). However, it is generally less accurate than higher-order methods like Simpson's rule.
-
Simpson's 1/3 Rule: Simpson's 1/3 rule, a second-order method, provided a result of 364​≈21.333, which is exactly the same as the analytical solution. This demonstrates the higher accuracy of Simpson's rule compared to the trapezoidal rule. Simpson's rule uses quadratic polynomials to approximate the function, capturing the curvature more effectively.
Comparison of Accuracy and Efficiency
- Accuracy: Simpson's 1/3 rule is more accurate than the trapezoidal rule for the same number of subintervals. This is because Simpson's rule uses a higher-order polynomial approximation.
- Efficiency: The trapezoidal rule is computationally simpler than Simpson's rule, but to achieve the same level of accuracy, the trapezoidal rule requires a much larger number of subintervals, making it less efficient in many cases.
Conclusion
In this article, we evaluated a double integral both analytically and numerically using the multiple application trapezoidal rule and Simpson's 1/3 rule. The analytical solution provided the exact value, while the numerical methods gave approximations. Simpson's 1/3 rule demonstrated its superior accuracy by matching the analytical result, whereas the trapezoidal rule had a significant error. This comparison highlights the importance of choosing an appropriate numerical method based on the desired accuracy and computational efficiency. For higher accuracy, methods like Simpson's rule are preferred, while for simpler calculations with lower accuracy requirements, the trapezoidal rule can be used. The choice depends on the specific problem and the trade-off between accuracy and computational cost. Ultimately, understanding the strengths and limitations of each method allows for more effective problem-solving in numerical integration.