<<

Multiple

Definition

Multiple integrals are definite integrals and they arise in many of , in particular, in , where , masses, and moments of inertia of bodies are of interest. Definition of multiple integrals is the extention of the definition of simple integrals: The of integration V is being split into many small cubes or other small elements of the volumes

∆V i and the is defined as the of the sum. For a 3 d integral one defines

N f r V ≡ f x, y, z x y z = lim N→∞ f ri ∆Vi ‡V @ D ‡ ‡ ‡V @ D ‚ @ D i=1

In particular, for the around the z axis Izz one has

N 2 2 2 2 2 Izz = ρ x + y V ≡ ρ x + y x y z = lim N→∞ ri,¶ ∆Mi ‡VI M ‡ ‡ ‡VI M ‚ i=1 where ∆Mi = r ∆Vi and r is the mass density.

Recursive calculation of integrals

Another equivalent definition of a multiple integral is recursive and reduces it to simple integrals. In particular, a double integral can be introduced as the repeated integral of the type

x y x 2 2@ D f x, y x y = F x x, F x = f x, y y. ‡ ‡ @ D ‡x @ D @ D ‡y x @ D 1 1@ D It can be shown that the result does not depend on the order of integrations over x and y and is the same as according to the symmetric definition above. As an example les us calculate the of a rectangle -a/2 < x < a/ 2, -b/2 < y < b/ 2:

a 2 b 2 a 2 ê ê ê S = x y = x y = x b = ab ‡ ‡−a 2 < x < a 2 ‡−a 2 ‡−b 2 ‡−a 2 ê ê ê ê ê −b 2 < y < b 2 ê ê The same can be done by the Mathematica command

bê2 aê2 x y ‡− ‡− bê2 aê2 a b or

aê2 bê2 y x ‡− ‡− aê2 bê2 a b or

− − Integrate @1, 8x, a ê 2, a ê 2<, 8y, b ê 2, b ê 2

Another example is the r < R . 2 Mathematical_physics-07-Multiple_Integrals.nb

R R2−x2 S = x y = x y = ‡ ‡r < R ‡−R ‡− R2−x2

R R x x 2 R2 − x2 = x R2 − x2 + R2 ArcTan = πR2 ‡ B F −R 2 2 R − x −R In this case, there is no elegant Mathematica command to integrate over the region x2 + y2 < R2. Instead, one has to do work and set the integration limits explicitly

R R2−x2 y x êê Timing ‡−R‡− R2−x2

7.672, π R R2 : > or

− − 2 − 2 2 − 2 → > Integrate B1, 8x, R,R<, :y, R x , R x >, Assumptions R 0F êê Timing 0.234, π R2 9 = Ellipsoid is defined by the equation

x2 y2 z2 + + = 1 a2 b2 c2 The volume of the ellipsoid is given by the integral

x2 x2 = − − − − Vellipsoid Integrate B1, 8x, a, a<, :y, b 1 , b 1 >, a2 a2

x2 y2 x2 y2 − − − − − → > > > :z, c 1 , c 1 >, Assumptions 8a 0, b 0, c 0

4 a b c π 3

For the one obtains

= → → → Vsphere Vellipsoid ê. 8a R, b R, c R< 4 π R3 3

ü Moments of inertia of the cone

Let us calculate the momentz of inertia of a cone with the base of R and height h. Putting the origin of the coordinate system in the apex of the cone, the z axis being directed from the apex to the base of the cone, one obtains Mathematical_physics-07-Multiple_Integrals.nb 3

z z Izz = ρ Integrate x2 + y2, z, 0, h , x, − R, R , B 8 < : h h >

z 2 z 2 y, − R − x2 , R − x2 , Assumptions → h > 0, R > 0 : h h > 8

1 h π R4 ρ 10 z z Ixx = ρ Integrate y2 + z2, z, 0, h , x, − R, R , B 8 < : h h >

z 2 z 2 y, − R − x2 , R − x2 , Assumptions → h > 0, R > 0 : h h > 8

1 h π R2 4 h2 + R2 ρ 20 I M

Iyy = Ixx by symmetry. It is convenient to express the density r via the mass of the cone M using r = M/V. With

z z V = Integrate 1, z, 0, h , x, − R, R , B 8 < : h h >

z 2 z 2 y, − R − x2 , R − x2 , Assumptions → h > 0, R > 0 : h h > 8

1 h π R2 3 one obtains, finally

M Izz = Izz . ρ → ê V M Ixx = Ixx . ρ → ê V 3 M R2 10 3 M 4 h2 + R2 20 I M

The moments of inertia of the cone above are defined with respect to its apex. Also of interest are moments of inertia with respect to the center of mass rCM defined by 1 rCM = r V, ρ = const V ‡V The center of mass of the cone is located, by symmetry, on its z axis,

1 z z zCM = Integrate z, z, 0, h , x, − R, R , V B 8 < : h h >

z 2 z 2 y, − R − x2 , R − x2 , Assumptions → h > 0, R > 0 : h h > 8

3 h 4 4 Mathematical_physics-07-Multiple_Integrals.nb

Now putting the origin of the coordinate system in the center of mass, one obtains another value of the xx moment of inertia, IxxCM

M z z IxxCM = Integrate y2 + z − zCM 2, z, 0, h , x, − R, R , V B H L 8 < : h h >

z 2 z 2 y, − R − x2 , R − x2 , Assumptions → h > 0, R > 0 : h h > 8

3 M h2 + 4 R2 80 I M

Let us check the relation

CM 2 Ixx = Ixx H L + Ma , where a is the distance between the center of mass and the point used in the definition of Ixx

a = zCM; == + 2 Ixx IxxCM M a êê Simplify True

Numerical calculation of multiple integrals

Numerical calculation of multiple integrals in Mathematica is done by the similar command as for their analytical calcula- tion. For instance, consider the trips integral P[G] that appears in the theory of magnetism

1 λ x_, y_, z_ = Cos x + Cos y + Cos z ; @ D 3 H @ D @ D @ DL 1 π π π 1 = P@G_ D : x y z π 3 ‡−π‡−π‡−π 1 − G λ x, y, z H2 L @ D This and related integrals can be calculated analytically but Mathematica cannot do it because analytical calculation requires a dosen of nontrivial transformations. The command

N@P@1DD $Aborted

Does not produce any result because Mathematica attempts first to calculate the integral analytically and then find its numerical value at G = 1. To proceed, one has to define this function as a numeric integral

1 1 = −π π −π π − π π P@G_ D : NIntegrate B , 8x, , <, 8y, , <, 8z, ,

− λ Normal @ @1 @x, y, zD, 8x, 0, 2<, 8y, 0, 2<, 8z, 0, 2

This is why Mathematica complains numerically calculating this integral and the accuracy is lower than usual, although not bad. Mathematical_physics-07-Multiple_Integrals.nb 5

P@1D NIntegrate::slwcon : Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small. à 1.51639

Consulting the Help and increasing the order of the Mutidimensional rule solves the accuracy problem

1 1 = −π π −π π P@G_ D : NIntegrate B , 8x, , <, 8y, , <, π 3 1 − G λ x, y, z H2 L @ D −π π → → 8z, , <, Method 8"MultiDimensionalRule", "Generators" 6

P@ 1D 1.51639

Also in this case one can analytically integrate over one of the variables and then integrate over the two remaining variables without problems and faster

1 1 PP G_, x_, y_ = Integrate , z, − π, π , GenerateConditions → False @ D π B − λ 8 < F 2 1 G @x, y, zD

3 2

2 −3 − G + G Cos x + G Cos y Log 2 − Log − H @ D @ DL + @ D B F −18 − G2 Cos 2 x + 12 G Cos y − 4 G Cos x −3 + G Cos y − G2 Cos 2 y @ D @ D @ DH @ DL @ D

− 3 − G + G Cos x + G Cos y Log @ D @ D B F ì −18 − G2 Cos 2 x + 12 G Cos y − 4 G Cos x − 3 + G Cos y − G2 Cos 2 y @ D @ D @ D H @ DL @ D π −18 − G2 Cos 2 x + 12 G Cos y − 4 G Cos x −3 + G Cos y − G2 Cos 2 y K @ D @ D @ D H @ DL @ D O

1 = −π π −π π P@G_ D : NIntegrate @PP @G, x, yD, 8x, , <, 8y, ,

Change of variables in multiple integrals

ü Polar, spherical, or cylindrical coordinates

If the integration region has a circular, spherical, or cylindrical symmetry, it is convenient to use polar, spherical, or cylindri- cal coordinates.

ü Polar coordinates

In two dimensions, one can use the polar coordinates (r, f), instead of the Descarde cordinates (x,y). The relation betwen the two reads 6 Mathematical_physics-07-Multiple_Integrals.nb

x = r Cos φ @ D y = r Sin φ @ D The area element dS in the polar coordinates is a nearly-square with sides dr and rdf, that is dS = rdr dφ

Now two-dimensional integrals can be rewritten as

f x, y x y = f r Cos φ , r Sin φ r r φ, ‡ ‡S @ D ‡ ‡S @ @ D @ DD with the appropriate change of integration limits. In particular, the area of a circle is given by a simple integral

R 2 π Scircle = r φ r ‡0 ‡0 π R2 or, in the factorized form,

R 2 π Scircle = r r φ ‡0 ‡0 π R2

The moments of inertia of a circle around the z and x axes are

2 2 3 Izz = ρ x + y x y = ρ r r φ ‡ ‡SI M ‡ ‡S

2 3 2 Ixx = ρ y x y = ρ r Sin φ r φ ‡ ‡S ‡ ‡S @ D where r is the surface mass density. Integration and substitution r = M/S yields

M R Izz = r3 r 2 π Scircle ‡0 M R 2 π = 3 φ 2 φ Ixx r r Sin @ D Scircle ‡0 ‡0 MR2 2 MR2 4

As an application of the polar coordinates, let us consider the trick of calculating the

∞ I = −x2 x. ‡−∞ Square of this integral can be represented as the product of two similar integrals over x and y, a double integral that can be rewriten in the polar coordinates and easily calculated ∞ ∞ ∞ ∞ 2 −x2 −y2 − x2+y2 I = x y = H L x y = ‡−∞ ‡−∞ ‡−∞‡−∞ ∞ 2 π ∞ ∞ ∞ −r2 r φ r = 2 π −r2 r r = π −r2 dr 2 = −π−r2 = π. ‡0 ‡0 ‡0 ‡0 0

Thus

I = π . Mathematical_physics-07-Multiple_Integrals.nb 7

Cylindrical coordinates

Cylindrical coordinates is the straightforward extention of the polar coordinats into 3 dimensions leaving the z axis untouched. x = r Cos φ @ D y = r Sin φ @ D z = z

The infinitesimal volume in cylindrical coordinates reads dV = rdr dφdz

Now three-dimensional integrals can be rewritten as

f x, y, z x y z = f r Cos φ , r Sin φ , z r r φ z ‡ ‡ ‡V @ D ‡ ‡ ‡V @ @ D @ D D

Moment if inertia Izz of a is given by the same formula as that of a disc. Let us calculate Ixx with respect to the center of mass of a cylinder with radius R and height h.

Vcylinder = π R2 h; π M hê2 R 2 Ixx = r2 Sin φ 2 + z2 r φ r z ‡− ‡ ‡ I @ D M Vcylinder hê2 0 0 1 M h2 + 3 R2 12 I M

For a very short cilinder, h`R, the result for the disc is reproduced,

→ Ixx ê. h 0 MR2 4

For a very long cilinder, hpR, the result for the thin rod is reproduced,

→ Ixx ê.R 0 h2 M 12

Cylindrical coordinate system is convenient to calculate the volume of a thorus because the thorus has a rotational symmetry around the z axis and integrarion over f yields simply 2 p. 8 Mathematical_physics-07-Multiple_Integrals.nb

R = 3; r = 1; = + x@u_, v_ D : HR r Cos @vDL Sin @uD; = + y@u_, v_ D : HR r Cos @vDL Cos @uD; = z@u_, v_ D : r Sin @vD; → ParametricPlot3D @8x@u, vD, y@u, vD, z@u, vD<, 8u, 0, 2 Pi <, 8v, 0, 2 Pi <, PlotStyle 8Red

The remaining integration is over a circle of radius r centered at the distance R from the z axis.

R = 3; r = 1; z = 0.5; ρ + → − → ρ Show BPlot @Null, 8 , 0, R 2 r<, PlotRange 8 1.5, 1.5 <, AxesLabel 8" ", "z", :R r z , z>>FF, − Graphics @Arrow @88R, r<, 8R, r<

z 1.5

1.0

0.5

r 1 2 3 4 5

-0.5

-1.0

-1.5

r R+ r2−z2 Vthorus = 2 π ρ ρ z ‡−r‡R− r2−z2

2 π2 r r2 R

or better Mathematical_physics-07-Multiple_Integrals.nb 9

Vthorus =

π ρ − ρ − 2 − 2 + 2 − 2 → > > 2 Integrate B , 8z, r, r<, : ,R r z ,R r z >, Assumptions 8R 0, r 0

It is interesting that one can straighten the thorus replacing it by the cylinder of radius r and height 2 pR. The volume remains the same and given by V = Ipr2)(2pR) = 2 π2 r2 R. The moment of inertia of the thorus with respect to the z axis is given by

M Izz = 2 π Integrate ρ3, z, −r, r , Vthorus B 8 <

ρ − 2 − 2 + 2 − 2 → > > : ,R r z ,R r z >, Assumptions 8R 0, r 0

In the limit r = 0 this reduces to the moment of inertia of a ring MR 2.

ü Spherical coordinates

Spherical coordinates ( r,J,f) are defined by x = r Sin ϑ Cos φ @ D @ D y = r Sin ϑ Sin φ @ D @ D z = r Cos ϑ @ D where J is the polar angle and f is the azimuthal angle. The infinitesimal volume in the spherical coordinates is a nearly- cube with the sides dr, rdJ, r Sin[ J]df, that is,

dV = r2 Sin ϑ dr dϑdφ @ D As an illustration, let us calculate the volume of a sphere

R π 2 π = 2 ϑ φ ϑ Vsphere r Sin @ D r ‡0 ‡0 ‡0 4 π R3 3 or, in the factorized form

R π 2 π = 2 ϑ ϑ φ Vsphere r r Sin @ D ‡0 ‡0 ‡0 4 π R3 3

This integration is much simpler than that for the ellipsoid in the Descarde coordinates above. On the oher hand, integration in the spherical coordinates is simple only for a sphere, but for an ellipsoid it becomes complicated.

Let us calculate the moment of inertia of a solid sphere in the spherical coordinates. To find Izz , one has to integrate x2 + y2 = r2 Sin @JD2 over the sphere's volume

M R π 2 π = 4 ϑ 3 ϑ φ Izz r r Sin @ D Vsphere ‡0 ‡0 ‡0

2 M R2 5 10 Mathematical_physics-07-Multiple_Integrals.nb

General

General change of variables (x,y,z) Ø(u,v,w) etc in multi-dimensional integrals can be effectuated by

f x, y, z x y z = ‡ ‡ ‡ @ D ∂ x, y, z f x u, v, w , y u, v, w , z u, v, w H L u v w, ‡ ‡ ‡ @ @ D @ D @ DD ∂ u, v, w H L ∂ x,y,z where J[u, v, w ]ª H L is the Jacobian of the transformation defined as a of partial ∂ u,v,w H L ∂x ∂x ∂x ∂u ∂v ∂w ∂ x, y, z H L ≡ ∂y ∂y ∂y ∂ u, v, w ∂u ∂v ∂w H L ∂z ∂z ∂z ∂u ∂v ∂w

In fact the Jacobian is determined as the absolute value of this. The results above are valid in all dimentions. For instance, the Jacobian of the transition to the is

∂x ∂x ∂ x, y ∂r ∂φ Cos φ −r Sin φ H L ≡ = @ D @ D = r Cos φ 2 + Sin φ 2 = r ∂ r, φ ∂y ∂y ¢ Sin φ r Cos φ ¶ I @ D @ D M H L ∂r ∂φ @ D @ D in accordance with our previous consideration. Let us calculate the Jacobian of the spherical coordinate system with the help of Mathematica.

= ϑ φ x r Sin @ D Cos @ D; = ϑ φ y r Sin @ D Sin @ D; = ϑ z r Cos @ D;

∂r x ∂ϑ x ∂φ x = ∂ y ∂ y ∂ y J Det B r ϑ φ F êê Simplify ∂r z ∂ϑ z ∂φ z

r2 Sin ϑ @ D again in accordance with previous considerations.

As an illustration of a general change of variables, let us calculate the double integral

1 1 1 II = x y ‡0 ‡0 1 − x2 y2 π2 8

In terms of new variables ( u,v) so that

Sin u Sin v x = @ D ; y = @ D ; Cos @vD Cos @uD the denominator of the integrand becomes

1 − Tan u 2 Tan v 2 @ D @ D On the other hand, the Jacobian is Mathematical_physics-07-Multiple_Integrals.nb 11

∂u x ∂v x J = Det Simplify B ∂u y ∂v y F êê

1 − Tan u 2 Tan v 2 @ D @ D Thus in the new variables the integrand is 1. It remains to figure out the integration region in ( u,v). Let us first invert the transformation

Sin u Sin v == @ D == @ D Solve B:x , y >, 8u, v

− 1 + x2 y2 x −1 + y2 v → − ArcSec − , u → −ArcSin , :: B F B F> −1 + y2 − 1 + x2 y2

− 1 + x2 y2 x −1 + y2 v → ArcSec − , u → −ArcSin , : B F B F> −1 + y2 − 1 + x2 y2

− 1 + x2 y2 x −1 + y2 v → −ArcSec , u → ArcSin , : B F B F> −1 + y2 −1 + x2 y2

−1 + x2 y2 x − 1 + y2 v → ArcSec , u → ArcSin : B F B F>> −1 + y2 −1 + x2 y2

Take the positive solution

−1 + x2 y2 = vxy @x_, y_ D : ArcSec B F − 1 + y2

x − 1 + y2 = uxy @x_, y_ D : ArcSin B F −1 + x2 y2

Draw the four lines in the ( u,v) plane that corresponds to the four sides of the square in the ( x,y) plane. As our transformation becomes singular at x = 1 and y = 1, go a bit away from these lines. 12 Mathematical_physics-07-Multiple_Integrals.nb

a = 0.00000000001; Show @ ParametricPlot @8uxy @x, 0D, vxy @x, 0D<, − → → 8x, 0, 1 a<, PlotRange All, PlotStyle 8Thick, Green

1.5

1.0

0.5

0.5 1.0 1.5

Thus the integration region is bordered by the lines π u = 0, v = 0, u + v = . 2 The integral is equal to the area of this triangle,

1 π π π2 II = × × = 2 2 2 8 Let us now express our integral via series expanding the integrand

1 1 1 II = x y = ‡0 ‡0 1 − x2 y2 1 1 2 3 1 1 1 1 + x2 y2 + x2 y2 + x2 y2 + ... x y = 1 + + + + ... ‡0 ‡0 J I M I M N 32 52 72 This allows to calculate the series

∞ 1 S = ‚ 2 n=1 n π2 6 Mathematical_physics-07-Multiple_Integrals.nb 13

2 The sum of odd terms of this series is S = π . The sum of its even terms is odd 8 1 1 1 1 1 1 1 Seven = + + + ... = 1 + + + ... = S 22 42 62 4 22 32 4 Thus

1 π2 S = Seven + Sodd = S + 4 8

2 and S = π . 6