Calculus2_7_CC14
Calculus2_7_CC14
CAlCULUS 2 (MT1005)
Project Report
MEMBERS
ACKNOWLEDGEMENT
First of all, we are grateful to M.S. Lê Thái Thanh for assigning this project and teaching us the
exercise lectures on Calculus 2. Then, we would like to express our gratitude to everyone who assisted
us with their help and guidance in this project; it would not have been possible otherwise. We are proud
to present the result of our research and work. We have made every effort to produce the best outcome,
even though there may be some limitations in our results.
PREFACE
Calculus is an essential subject for all engineers. The study of change has proven valuable in a variety
of real-world applications. As a result, each engineer must understand not only theory but also how to use
that theory to solve real-world situations. This report has been written to fulfill the Calculus 2 subject
requirement, which is one of the prerequisites for the Calculus 2 final exam. This report focuses on the
use of double integrals to solve problems, with Matlab commands serving as our primary programming
language.
TABLE OF CONTENTS
1 Assignment 1
1.1.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.3 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Programming 6
2.1 Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.1 Sample 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.2 Sample 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 Applications 10
1 Assignment
1.1.1 Definition
• Iterated Integrals: The double integral is expressed as an iterated integral of the form
ZZ Z b Z d
f (x, y) dA = f (x, y) dy dx
D a c
or
ZZ Z dZ b
f (x, y) dA = f (x, y) dx dy
D c a
This method breaks down the double integral into two separate integrals, one with respect to x and
the other with respect to y, and integrates over the respective intervals.
• Polar Coordinates: In certain cases, using polar coordinates can simplify the integration process.
The transformation is given by
x = r cos(θ)
.
y = r sin(θ)
The area element transforms as dA = r dr dθ, and the limits of integration also change accordingly.
1.1.3 Properties
• Change of Order: Under certain conditions, the order of integration can be changed without
affecting the result. This property is useful for simplifying calculations. For example, if f (x, y) is
continuous on a rectangular region D = [a, b] × [c, d], then
ZZ Z b Z d Z d Z b
f (x, y) dA = f (x, y) dy dx = f (x, y) dx dy
D a c c a
• Area Preservation: If f (x, y) is non-negative over D, then the double integral represents the
volume under the surface z = f (x, y) and above D. The value of the double integral gives the
volume.
RR p
(b) Evaluate I = | y − x2 | dx dy where D = {|x| ⩽ 1; 0 ⩽ y ⩽ 2}.
D
x2 y2
(c) Find the area of the part of the sphere x2 + y 2 + z 2 = a2 that lies inside the cylinder a2 + b2 =1
where 0 < b ≤ a.
Problem
x2 + y 2 = arctan xy
p
Find y ′ and y ′′ of the function y = y(x) given implicitly by ln
Solution
1 2x + 2yy ′ 1 y ′ .x − y
· p = ·
1 + ( xy )2 x2
p
x2 + y 2 2 x2 + y 2
x + y · y′ = y′ · x − y
y ′ (x − y) = x + y
x+y
y′ =
x−y
(1 + y ′ )(x − y) − (1 − y ′ )(x + y)
y ′′ =
(x − y)2
x − y + x · y′ − y · y′ − x − y + x · y′ + y · y′
y ′′ =
(x − y)2
−2(y − x · y ′ )
y ′′ =
(x − y)2
Problem
RR p
Evaluate I = | y − x2 | dx dy where D = {|x| ⩽ 1; 0 ⩽ y ⩽ 2}.
D
Solution
p
This integral represents the area under the curve | y − x2 | over the region D, with
D = {|x| ≤ 1; 0 ≤ y ≤ 2}.
ZZ p ZZ p ZZ p
|y − x2 | dx dy = (y − x2 ) dx dy + (x2 − y) dx dy
D D1 D2
Z 1 Z 2 p Z 1 Z x2 p
I= y− x2 dy dx + x2 − y dy dx
−1 x2 −1 0
Z 1 Z 1
2 3 2 3
= (2 − x2 ) 2 dx + (x2 ) 2 dx
3 −1 3 −1
1
2 1
Z Z
2 2 3
= (2 − x ) dx + 2 |x|3 dx
3 −1 3 −1
Z 1 Z 1
2 3
= (2 − x2 ) 2 dx + |x|3 dx
3 −1 −1
Z 1
3
Denote A = (2 − x2 ) 2 dx
−1
Z 1
3
A=2 (2 − x2 ) 2 dx
0
√ π
x= 2 sin t, with 0 ≤ t ≤
4
π
√ Z 4 3
A=2 2 (2 − 2(sin t2 )) 2 cos t dt
0
Z π
4
= 8(cos t)4 dt
0
3·π+8
=
32
Z 1
Denote B = |x|3 dx
−1
Z 1
B=2 x3 dx
0
1
B=
2
2
(2) = (A + B)
3
= 3.237
I = 3.237
Problem
x2 y2
Find the area of the part of the sphere x2 + y 2 + z 2 = a2 that lies inside the cylinder a2 + b2 =1
where 0 < b ≤ a
Solution
p
With the above Oxy: z = a2 − x2 − y 2
x2 y2
Because of: + =1
a2 b2
We denote: x = a cos t; y = b sin t (0 ≤ t ≤ 2π)
p Z 2π p
I= a2 − b2 a2 sin4 t + b2 cos2 t sin2 t dt
0
p Z 2π p
S = 2I = 2 a2 − b2 a2 sin4 t + b2 cos2 t sin2 t dt
0
2 Programming
2.1 Task
Write a Matlab or Python code that calculates and graphically describes the geometric meaning of
the partial derivative of the function f (x, y) at M0 (x0 , y0 ). Allows users to enter f (x, y), x0 , y0 .
35 plot3 ( x0 , y0 , f ( x0 , y0 ) , ' ro ' , ' MarkerSize ' , 10 , ' MarkerFaceColor ' , 'r ')
;
36 % Define different directional vectors in the tangent plane
37 directions = [
38 1 , 0; % along x - axis
39 0 , 1; % along y - axis
40 ];
41 % Plot the tangent lines
42 t = linspace ( -10 , 10 , 100) ;
43 for i = 1: size ( directions , 1)
44 direction = directions (i , :) ;
45 x_tangent = x0 + t * direction (1) ;
46 y_tangent = y0 + t * direction (2) ;
47 z_tangent = z0 + t * ( df_dx_value * direction (1) + df_dy_value *
direction (2) ) ;
48 plot3 ( x_tangent , y_tangent , z_tangent , ' LineWidth ' , 2) ;
49 end
50 xlabel ( 'x ') ;
51 ylabel ( 'y ') ;
52 zlabel ( 'f (x , y ) ') ;
53 title ( ' Geometric Meaning of Partial Derivatives ') ;
54 grid on ;
55
2.3 Result
2.3.1 Sample 1
INPUT
OUTPUT
2.3.2 Sample 2
INPUT
OUTPUT
3 Applications
Problem Introduction: In image processing, we often need to calculate the average brightness of
an image over a specific region.
Explaining and Expressing the Solution: We can use a double integral to calculate the average
brightness B̄ over a rectangular region R in an image, where B(x, y) represents the brightness at point
(x, y). The solution involves integrating the brightness function over the region R and then dividing by
the area of R.
ZZ
1
B̄ = B(x, y) dA
Area(R) R
Mathematical Equation:
ZZ
1
B̄ = B(x, y) dx dy
Area(R) R
Conclusion: This application allows us to analyze the brightness distribution in images, which is
useful for tasks like object recognition, contrast enhancement, and quality assessment.
Source: Digital Image Processing by Rafael C. Gonzalez and Richard E. Woods.
Problem Introduction: In probabilistic modeling, we often deal with continuous random variables
and need to compute probabilities over regions in the variable space.
Explaining and Expressing the Solution: To find the probability that a continuous random
variable X lies within a region D, we use a double integral over that region, where the integrand represents
the probability density function f (x, y) of X.
ZZ
P (X ∈ D) = f (x, y) dA
D
Mathematical Equation:
ZZ
P (X ∈ D) = f (x, y) dx dy
D
Conclusion: Double integrals help us calculate probabilities over continuous domains, which is
fundamental in statistical analysis and machine learning.
Source: Probability and Statistics for Computer Scientists by Michael Baron.
Problem Introduction: In computer graphics and 3D modeling, we often need to calculate the
surface area of complex shapes.
Explaining and Expressing the Solution: By representing a 3D surface as a function z = f (x, y),
we can calculate its surface area over a region D using a double integral.
s 2 2
ZZ
∂f ∂f
Surface Area = 1+ + dA
D ∂x ∂y
Mathematical Equation:
s 2 2
ZZ
∂f ∂f
Surface Area = 1+ + dx dy
D ∂x ∂y
Conclusion: This application is crucial for accurately representing and rendering complex surfaces
in computer graphics.
Source: Computer Graphics: Principles and Practice by John F. Hughes et al.
Problem Introduction: In mechanics, determining the center of mass of a solid object is essential
for understanding its stability and motion.
Explaining and Expressing the Solution: The center of mass (xcm , ycm ) of a 2D object with
variable density is given by a double integral over its region D, where ρ(x, y) represents the density
function.
ZZ
1
xcm = xρ(x, y) dA
M D
ZZ
1
ycm = yρ(x, y) dA
M D
Mathematical Equations:
ZZ
1
xcm = xρ(x, y) dx dy
M D
ZZ
1
ycm = yρ(x, y) dx dy
M D
RR
where M = D
ρ(x, y) dA is the total mass.
Conclusion: Double integrals help us determine the center of mass, which is crucial in mechanics
for studying equilibrium and motion of objects.
Source: Classical Mechanics by John R. Taylor.
Problem Introduction: The moment of inertia of an object measures its resistance to rotational
motion.
Explaining and Expressing the Solution: The moment of inertia I about an axis can be cal-
culated using a double integral over the object’s region D, where ρ(x, y) represents the density function
and d is the perpendicular distance from the axis of rotation.
ZZ
I= ρ(x, y)d2 dA
D
Mathematical Equation: ZZ
I= ρ(x, y)d2 dx dy
D
Conclusion: Double integrals play a key role in computing moments of inertia, aiding in the analysis
of rotational dynamics and stability in mechanics.
Source: Engineering Mechanics: Dynamics by J. L. Meriam and L. G. Kraige.
CONCLUSION
Through this large assignment, we learned how to work together and also about Matlab symbolism.
We learned how to solve double integrals problems and learn about the applications of them in real life.
REFERENCES
[1] Nguyễn Đình Huy (Ed) - Lê Xuân Đại - Ngô Thu Lương - Nguyễn Bá Thi - Trần Ngọc Diễm - Đậu
Thế Phiệt (2018) Calculus 2 Textbook, Ho Chi Minh City National University, 1st ed.
[2] J. Steward (2012) Calculus. Concepts and Contexts, Thomson Learning, 7th ed.
[3] Rafael C. Gonzalez and Richard E. Woods (2018) Digital Image Processing, Pearson, 4th ed.
[4] Michael Baron (2013) Probability and Statistics for Computer Scientists, Chapman and Hall/CRC,
2nd ed.
[5] John F. Hughes et al (2013) Computer Graphics: Principles and Practice, Addison-Wesley Profes-
sional, 3rd ed.
[6] John R. Taylor (2005) Classical Mechanics, University Science Books, null ed.
[7] J. L. Meriam and L. G. Kraige (2012) Engineering Mechanics: Dynamics, Wiley, 7th ed.