Calculus/Change of variables

From testwiki
Revision as of 16:44, 12 May 2022 by imported>LeoChiukl (Change of coordinate system: fix typo)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Calculus/Top Nav

The Jacobian matrix and the change of variables are proven to be extremely useful in multivariable calculus when we want to change our variables. They are extremely useful because if we want to integrate a function such as

Rex+yxydA

, where

R

is the trapezoidal region with vertices

(1,0),(2,0),(0,2),(0,1)

,

it would be helpful if we can substitute

x+y

as

u

and

xy

as

v

because

euv

is easier to be integrated. However, we need to be familiar with integration, transformation, and the Jacobian, which the latter two will be discussed in this chapter.

Transformation

Let us start with an introduction to the process of variable transformation. Assume that we have a function

f(x,y)

. We want to calculate the expression:

Rf(x,y)dA

in which

R

is a region in

xy

-plane. (Another notation for

dA

is

dxdy

. (

dA

here is not differential.) )

However, the area of R is too complicated to be written out in terms of x,y. So, we want to change the variables so that the area of R can be more easily expressed. Furthermore, the function itself is too hard to be integrated.

It would be much easier if the variables can be changed to more convenient ones, Assume there are two more variables

u,v

that have connections with variables

x,y

that satisfy:

x=x(u,v)andy=y(u,v).

The original integral can be rewritten into:

Sf(x(u,v),y(u,v))|(x,y)(u,v)|dudv

in which S is another region in uv-plane transformed from the region R in xy-plane. The purpose of this section is to have us understand the process of this transformation, excluding the |(x,y)(u,v)| part. We will discuss the purpose and meaning of |(x,y)(u,v)| in the next section.

Introduction

In fact, we have already encountered two examples of variable transformation in 3.

The first example is using polar coordinates in integration while the second one is using spherical coordinates in integration. Using polar coordinates in integration is a change in variable because we effectively change the variables

x,y,z

into

r,θ,z

with relations:

x=rcosθy=rsinθz=z

As a result, the function being integrated

f(x,y)

is transformed into

f(x(r,θ,z),y(r,θ,z),z(r,θ,z))

, thus giving us:

Rf(x,y,z)dV=Sf(rcosθ,rsinθ,z)dz r dr dθ

, which is the formula for polar coordinates integration. (It will be proved later)

The second example, integration in spherical coordinates, offers a similar explanation. The original variables

x,y,z

and the transformed variables

ρ,θ,ϕ

have the relations:

{x=ρsinϕcosθy=ρsinϕsinθz=ρcosϕ

These relations can give us that

Rf(x,y,z)dV=Sf(ρsinϕcosθ,ρsinϕsinθ,ρcosϕ)ρ2sinϕ dρ dθ dϕ

, which is the formula for spherical coordinates integration. (It will be proved later)

Generalization

We understand the transformation from Cartesian coordinates to both polar and spherical coordinates. However, those two are specific examples of variable transformation. We should expand our scope into all kinds of transformation. Instead of specific changes, such as x=rcosθ,y=rsinθ and z=z, we will talk about general changes. Let's start from two variables.

We consider a change of variables that is given by a transformation

T

from the

uv

-plane to the

xy

-plane. In other words,

T(u,v)=(x,y)

, where

(x,y)

is the original or old variables and

(u,v)

is the new ones.

In this transformation,

x,y

are related to

u,v

by the equations

x=g(u,v)y=h(u,v)

We usually just assume that

T

is a

C1

transformation, which means that

g,h

have continuous 1st-order partial derivatives. Now, time for some terminologies.

  • If T(u1,v1)=(x1,y1), the point (x1,y1) is called the Template:Font color of the point (u1,v1).
  • If no two points have the same image, like functions, T, the transformation, is called Template:Font color (or injective).
  • T transforms region S into region R. R is called the image of S. The transformation can be described as:

T(S)=R

T1(R)=S

Regions

Recall that we have established the transformation

T(S)=R

, where

S

is the region in the

uv

-plane while

R

is the region in the

xy

-plane. If we are given the region

S

and transformation

T

, we are expected to calculate the region

R

. For example, a transformation is defined by the equations

x=u2v2y=2uv

Find the image of

S

, which is defined as

S={(u,v):0u1, 0v1}

.

In this case, we need to know the boundaries of the region

S

, which is confined by the lines:

u=0u=1v=0v=1

If we can redefine the boundaries using x,y instead of u,v, we effectively will find the image of S.

When u=0(0v1){x=v2y=0(substitution)Thus, y=0(1x0)When u=1(0v1){x=1v2y=2vThus, x=1y24(0x1)When v=0(001){x=u2y=0Thus, y=0(0x1)When v=1(0u1){x=u21y=2uThus, x=y241(1x0)

As a result, the image of

S

is

R={(x,y):0y2, y241x1y24}

We can use the same method to calculate

S

from

R

.

The Jacobian

The Jacobian matrix is one of the most important concept in this chapter. It "compromises" the change in area when we change the variables so that after changing the variables, the result of the integral does not change. Recall that at the very beginning of the last section, we reserved the explanation of |(x,y)(u,v)| from Sf(x(u,v),y(u,v))|(x,y)(u,v)| du dv here. To actually start explaining that, we should review some basic concepts.

Review "u-substitution"

Recall that when we are discussing

u

-substitution (a simple way to describe "integration by substitution for single-variable functions"), we use the following method to solve integrals.

abf(x) dx=cdf(x(u)) dxdu duwhere c=x(a),d=x(b)

For example,

sin(ln(x))x dx
Let u=ln(x)Thus, dudx=1x du=1xdx
sin(ln(x))x dx=sin(ln(x)) (1x dx)rearrangement=sin(u) dulet u=ln(x)du=1x dx=cos(u)+Cintegration=cos(ln(x))+Cresubstitution

If we add endpoints into the integral, the result will be:

ee2sin(ln(x))x dx=ee2sin(ln(x)) (1x dx)rearrangement=12sin(u) duremember u=ln(x) and du=1x dx=[cos(u)]12integration=cos(1)cos(2)

If we look carefully at the "rearrangement" and "remember" part in the solution, we find that we effectively changed our variable from

x

to

u

through this method:

abf(x)dx=x=ax=bf(x(u)) d(x(u))=u=x(a)u=x(b)f(x(u)) dxdu du

, which is what we have mentioned above.

The appearance of the term dxdu not only is a mathematical product of deduction, but also serves a intuitive purpose. When we change our function from f(x) to f(x(u)), we also Template:Font color we are integrating, which can be seen by looking at the endpoints. This change of region is either Template:Font color or Template:Font color by a factor of dudx. To counter this change, dxdu is deduced to compromise (recall that dxdu(dudx)=1). We can simply think this term as a compromise factor that counters the change of region due to a change of variables.


Now, let us put our focus back to two variables. If we change our variables from x,y to u,v, we also Template:Font color we are integrating, as demonstrated in the previous section.

So, continuing our flow of thought, there should also be a term deduced to counter the change of region. In other words:

Rf(x,y)dA1=Sf(x(u,v),y(u,v))dA1dA2informal termdA2


Note that the symbols used here are for Template:Font color and not for official use. Official terms will be introduced later in the chapter, but for now, we use these terms for better understanding.

In this case, when we change the function from f(x,y) to f(x(u),y(u)), we Template:Font color or Template:Font color the area of our region, by a factor of dA2dA1; therefore, we need to counter the change with a factor of dA1dA2. The Jacobian matrix for two variables is basically an expression for calculating dA1dA2 in terms of u,v, so that we are able to integrate the new integral after transformation, since the function involved in the new integral can only in terms of u,v, but not x,y (we need to express x and y in terms of u,v).

The Jacobian

Double integrals

Now, it is time for us to deduce the Jacobian matrix. In the review above, we already established Template:Font color that the Jacobian matrix for two variables is basically dA1dA2, with dA1 being the infinitesimally small area in the region R in the xy-plane and dA2 being the infinitesimally small area in the region S in the uv-plane. Since we are changing our variables from x,y to u,v, we should describe dA1 and dA2 in terms of u,v over a region in uv-plane.


Let us start with

dA2

first because it is easier to calculate. We start with a small rectangle

S0

, which is a part of

S

, in the

uv

-plane whose lower left corner is the point

(u0,v0)

and whose dimensions are

Δu,Δv

. Thus, the area of

S0

is

ΔA2=ΔuΔv

The image of

S0

, in this case let's name it

R0

, is in the

xy

-plane according to the transformation

T(S0)=R0

. One of its boundary points is

(x0,y0)=T(u0,v0)

. We can use a vector

𝐫

to describe the position vector of

R0

of the point

(u,v)

. In other words,

𝐫

can describe the region

R0

given that

𝐫(u,v)=x(u,v)𝐢+y(u,v)𝐣where u0uu0+Δu, v0vv0+Δv

The region

R0

now can be described in terms of

u,v

. The next step is to utilize the position vector

𝐫(u,v)

to calculate its area

dA1

.


The shape of the region

R0

after transformation

R0=T(S0)

can be approximated, which is a parallelogram. As we learnt in algebra, the area of a parallelogram is defined to be the product of its base and height. However, this definition cannot help us with our calculations. Instead, we will use the cross product to determine its area. Recall that the area of a parallelogram formed by vectors

𝐚

and

𝐛

can be calculated by taking the magnitude of the cross product of the two vectors.

ΔA1=|𝐚×𝐛|

In this parallelogram, the two vectors

𝐚

and

𝐛

are, in terms of

u,v

:

𝐚=𝐫(u0+Δu,v0)𝐫(u0,v0) and 𝐛=𝐫(u0,v0+Δv)𝐫(u0,v0)

It seems very similar to the definition of partial derivatives:


𝐫u=limΔu0𝐫(u0+Δu,v0)𝐫(u0,v0)Δu and 𝐫v=limΔv0𝐫(u0,v0+Δv)𝐫(u0,v0)Δv

As a result, we can approximate that:


𝐚=𝐫(u0+Δu,v0)𝐫(u0,v0)Δu𝐫u and 𝐛=𝐫(u0,v0+Δv)𝐫(u0,v0)Δv𝐫v

Now, we calculate

𝐫u,𝐫v

, given that

𝐫(u,v)=x(u,v)𝐢+y(u,v)𝐣

:


𝐫u=xu(u,v) 𝐢+yu(u,v) 𝐣=xu 𝐢+yu 𝐣 and 𝐫v=xv(u,v) 𝐢+yv(u,v) 𝐣=xv 𝐢+yv 𝐣

We can calculate

ΔA1=||𝐚×𝐛||

(we take absolute value to prevent negative area). You can review the cross product in Chapter Template:Calculus/map page. Note that the inner bar of || is for calculating the magnitude (or norm) while the outer bar of || is for taking the absolute value.

ΔA1=||𝐚×𝐛||=||(Δu 𝐫u)×(Δv 𝐫v)||approximation=||𝐫u×𝐫v||ΔuΔv=||det(𝐢𝐣𝐤xuyu0xvyv0)||ΔuΔvcross product=||det(xuxvyuyv)𝐤||ΔuΔvevaluation=|det(xuxvyuyv)|𝐤|1|ΔuΔv

Then, we can substitute our newly deduced terms.

ΔA1ΔA2=|det(xuxvyuyv)|ΔuΔvΔuΔv=|det(xuxvyuyv)|=|xuyvxvyu|

Finally, we derived the Template:Font color of Jacobian. The definition of Jacobian is as follows:

Template:Calculus/Def

We will then use the Jacobian in the change of variables in integrals. The absolute value is added to prevent a negative area.

Rf(x,y)dAi=1mj=1nf(xi,yj)ΔAi=1mj=1nf(x(ui,vj),y(ui,vj))ΔA2Since ΔA2|(x,y)(u,v)|ΔuΔvi=1mj=1nf(x(ui,vj),y(ui,vj))ΔA2i=1mj=1nf(x(ui,vj),y(ui,vj)) |(x,y)(u,v)|ΔuΔvSf(x(u,v),y(u,v)) |(x,y)(u,v)| du dv

Here is the theorem for the change of variables in a double integral and we have Template:Font color intuitively why and how it works, but the above explanations are Template:Font color Template:Font color of this theorem. In particular, we make some approximation, while the statement in the following theorem is Template:Font color, and not approximation. The actual Template:Font color is quite complicated and advanced, and thus not included here.

Template:Calculus/Def Template:Calculus/Def <quiz display=simple> { Template:Font color }

{Choose correct expression(s) for the Jacobian (u,v)(x,y) in which x=2u and y=5v.} + 110 || Since x=2uu=x2 and y=5vv=y5, ||(u,v)(x,y)=\begin{vmatrix}\frac{1}{2}&0\\0&\frac{1}{5}\end{vmatrix}=\frac{1}{10}</math>. - |012150| || This is the expression for (u,v)(y,x). - |2005| || This is the expression for (x,y)(u,v). - |0250| || This is the expression for (y,x)(u,v). - 10 || This is the expression for (x,y)(u,v).

{Choose correct expression(s) for the integral D(x+y)(5x+2y) in which D is a region bounded by y=1x,x=2y,x=5y3 and y=15x2. |type="[]"} - 31201uvdudv || Let v=x+y and u=5x+2y, and the bounds in a transformed region via this change of variables are 1v2 and 0u1. || Then, the Jacobian is (u,v)(x,y)=52=3. || Thus, D(x+y)(5x+2y)=13D(x+y)(5x+2y)|(u,v)(x,y)|=131201uvdudv - 30112uvdudv || Let u=x+y and v=5x+2y, and the bounds in a transformed region via this change of variables are 1u2 and 0v1. || Then, the Jacobian is (u,v)(x,y)=25=3. || Thus, D(x+y)(5x+2y)=1|3|D(x+y)(5x+2y)|(u,v)(x,y)|=130112uvdudv - 130112uvdudv || Let u=x+y and v=5x+2y, and the bounds in a transformed region via this change of variables are 1u2 and 0v1. || Then, the Jacobian is (u,v)(x,y)=25=3. || Thus, D(x+y)(5x+2y)=1|3|D(x+y)(5x+2y)|(u,v)(x,y)|=130112uvdudv + 131201uvdudv || Let v=x+y and u=5x+2y, and the bounds in a transformed region via this change of variables are 1v2 and 0u1. || Then, the Jacobian is (u,v)(x,y)=52=3. || Thus, D(x+y)(5x+2y)=13D(x+y)(5x+2y)|(u,v)(x,y)|=131201uvdudv + 130112uvdudv || Let u=x+y and v=5x+2y, and the bounds in a transformed region via this change of variables are 1u2 and 0v1. || Then, the Jacobian is (u,v)(x,y)=25=3. || Thus, D(x+y)(5x+2y)=1|3|D(x+y)(5x+2y)|(u,v)(x,y)|=130112uvdudv

{Choose correct statement(s) from the following statements.} + If both u and v are independent from both x and y, the Jacobian (u,v)(x,y)=0. || This condition implies ux=uy=vx=vy=0. || Thus, the Jacobian equals zero. + If both u and v are independent from both x and y, the Jacobian (x,y)(u,v)=0. || Since both u and v are independent from both x and y implies that both x and y are independent from both u and v. (They have the same meaning) || This condition implies xu=xv=yu=yv=0. || Thus, the Jacobian equals zero. + If u is independent from both x and y, while v is dependent from both x and y, the Jacobian (u,v)(x,y)=0. || The condition u is independent from both x and y implies that ux=uy=0. || Thus, the first row of the Jacobian a zero row, and it can be seen that the Jacobian equals zero. + If u is independent from both x and y, while v is dependent from both x and y, the Jacobian (x,y)(u,v)=0. || The condition u is independent from both x and y implies that ux=uy=0. || Thus, the second row of the Jacobian a zero row, and it can be seen that the Jacobian equals zero. - If v=ku in which k is a real number, then the Jacobian (u,v)(x,y)=k. || Since vx=kux and vy=kuy in this case, || the Jacobian equals uxkuyuykux=k(uxuyuxuy)=0 || So, this statement is incorrect unless k=0, i.e., it is not always correct and thus not a correct statement. </quiz> Template:Calculus/Def Template:Hide

Triple integrals

If we continue our flow of thoughts, we can also find the Jacobian for three variables. Suppose there is a function

f(x,y,z)

.

x,y,z

has relations with

u,v,w

, which are

x=x(u,v,w),y=y(u,v,w),andz=z(u,v,w)
R

is a region in the

xyz

-space, and

S

is a region in the

uvw

-space, with transformation

T(S)=R

.


To calculate the Jacobian for three variables, we go through a similar process. The process of transformation will be: a rectangular prism with dimensions

Δu,Δv,Δw

in the

uvw

-space to a parallelepiped in the

xyz

-space and a volume of

ΔV2=ΔuΔvΔw

. The parallelepiped can be described with the position vector:

𝐫(u,v,w)=x(u,v,w) 𝐢+y(u,v,w) 𝐣+z(u,v,w) 𝐤

The three sides of the parallelepiped can be described by the position vector as:

𝐚=𝐫(u+Δu,v,w)𝐫(u,v,w),𝐛=𝐫(u,v+Δv,w)𝐫(u,v,w),and𝐜=𝐫(u,v,w+Δw)𝐫(u,v,w).

Since the derivatives of

𝐫

are defined as:

𝐫u=limΔu0𝐫(u+Δu,v,w)𝐫(u,v,w)Δu,𝐫v=limΔv0𝐫(u,v+Δv,w)𝐫(u,v,w)Δv,and𝐫w=limΔw0𝐫(u,v,w+Δw)𝐫(u,v,w)Δw.

The three vectors

𝐚,𝐛,𝐜

can be similarly approximated into:

𝐚Δu 𝐫u,𝐛Δv 𝐫v,and𝐜Δw 𝐫w

Since the position vector

𝐫

is

𝐫(u,v,w)=x(u,v,w) 𝐢+y(u,v,w) 𝐣+z(u,v,w) 𝐤

, the partial derivatives for

𝐫

are:

𝐫u=xu 𝐢+yu 𝐣+zu 𝐤,𝐫v=xv 𝐢+yv 𝐣+zv 𝐤,and𝐫v=xw 𝐢+yw 𝐣+zw 𝐤

Recall that the volume of a parallelepiped determined by the vectors

𝐚,𝐛,𝐜

is the magnitude of their scalar triple product:

V=|(𝐚×𝐛)  𝐜|

We just need to substitute the vectors with what we have yielded.

ΔV1=|(𝐚×𝐛)  𝐜|=|(Δu 𝐫u)×(Δv 𝐫v)  Δw 𝐫w|=|𝐫u×𝐫v  𝐫w|ΔuΔvΔw=||𝐢𝐣𝐤xuyuzuxvyvzv|  (xwywzw)|ΔuΔvΔwcross product=|(yuzvzuyvzuxvxuzvxuyvyuxv)  (xwywzw)|ΔuΔvΔw=|xwyuzvxwyvzu+xvywzuxuywzv+xuyvzwxvyuzw|ΔuΔvΔwdot product=|xu(yvzwywzv)+xv(ywzuyuzw)+xw(yuzvyvzu)|ΔuΔvΔwrearrangement=||xuxvxwyuyvywzuzvzw||ΔuΔvΔwcross product

Thus,

ΔV1ΔV2=||xuxvxwyuyvywzuzvzw||ΔuΔvΔwΔuΔvΔw=||xuxvxwyuyvywzuzvzw||

.

Template:Calculus/Def

The absolute value is added to prevent a negative volume.

Rf(x,y,z)dVi=1mj=1nk=1pf(xi,yj,zk)ΔVi=1mj=1nk=1pf(x(ui,vj,wk),y(ui,vj,wk),z(ui,vj,wk))ΔV2Since ΔV2|(x,y,z)(u,v,w)|ΔuΔvΔwi=1mj=1nk=1pf(x(ui,vj,wk),y(ui,vj,wk),z(ui,vj,wk))ΔV2i=1mj=1nk=1pf(x(ui,vj,wk),y(ui,vj,wk),z(ui,vj,wk)) |(x,y,z)(u,v,w)|ΔuΔvΔwSf(x(u,v,w),y(u,v,w),z(u,v,w)) |(x,y,z)(u,v,w)| du dv dw

Then, we have the following theorem which is analogous to the theorem for double integrals. Again, we should aware that the above explanations are Template:Font color proof of this theorem. Template:Calculus/Def Template:Calculus/Def <quiz display=simple> { Template:Font color }

{Choose correct statement(s) from the following statements. |type="[]"} - (x,y,u)(x,y,v)=uv. ||(x,y,u)(x,y,v)=|1xyxvyx1yvuxuyuv| ||This is not equal to uv in general. - Dxyz|(u,v,w)(x,y,z)|dxdydz gives the 4-dimensional volume under the graph of f(x,y,z)=xyz over the region D in xyz-space. || The absolute value of the Jacobian is an extra term. Without it, this is true. + D(uvw)dudvdw gives the 4-dimensional volume under the graph of f(u,v,w)=uvw over the region D in uvw-space. || By the proposition about 4-dimensional volume given by triple integration, this is true. + D|(x,y,z)(u,v,w)|dudvdw gives the volume of the region D in xyz-space, that is mapped from the region D in uvw-space by a transformation satisfying the conditions mentioned in the theorem about change of variables in a triple integral. || This integral equals D1dxdydz which is the volume of the region D in xyz space, || since the function involved in the above integral is f(x,y,z)1 (constant function), the value of function still equals one after changing variables x,y and z to u,v and w respectively by setting x=x(u,v,w),y=y(u,v,w) and z=z(u,v,w), || and we need to insert an extra term to the integral, namely absolute value of the Jacobian. </quiz> Now, we understand the purpose and the derivation of the Jacobian. It is time to apply this new knowledge to some examples. The first two examples consist of the change of coordinates from the Cartesian coordinate system into the polar coordinate system and the change of Cartesian to spherical coordinates.

Change of coordinate system

Sometimes, we may change the region we are integrating over to another region in other coordinate system. This can simplify the computation of integrals, especially when the region in Cartesian coordinate system is related to circle, e.g. sphere, cone, circle, etc.

Let us start with the change of coordinates from the Cartesian coordinate system into the polar coordinate system. Template:Anchor Template:Calculus/Def Template:Calculus/Def Template:Anchor Template:Calculus/Def Template:Anchor Template:Calculus/Def Template:Calculus/Def Template:Calculus/Def Template:Hide Template:Calculus/Def Template:Hide Template:Calculus/Def Template:Hide Template:Calculus/TOC Template:Calculus/Top Nav Template:BookCat