Help with change of variables please

In summary: Hi! I am an expert summarizer of content. In summary, the conversation discusses evaluating a double integral using change of variables. The individual is confused about whether to use polar coordinates or u and v substitutions. They eventually find a solution using u and v substitutions, but it is pointed out that the transformation is not globally invertible and the Jacobian for the integral is not 1. The conversation also briefly mentions the possibility of using polar coordinates, but it is noted that it cannot be done in this case.
  • #1
ninjacookies
16
0
I'm trying to evaluate the double integral

[tex]\int \int \sqrt{x^2 + y^2} \, dA[/tex] over the region R = [0,1] x [0,1]
using change of variables


Now I know polar coordinates would be the most efficient way, and thus I could say r= [tex] \sqrt{x^2 + y^2} [/tex] . Is this legal to use polar coordinates when doing change of variables? So if I do it this way, would I integrate from theta goes from 0 to 2pi and then r goes from 0 to 1?
I'm utterly confused. Anyone able to help me out a bit? Thanks
 
Physics news on Phys.org
  • #2
or would I just set u = x^2 and v = y^2 ...and then take the jacobian of the transformation and then set up the integral?
 
  • #3
lol dang...must be a slow day around here? :(

Well, after fooling around, I've got an answer. I set u = x^2, v =y^2, and then calculated the jacobian of T which was 1. The image transformation limits of integration for u and v turned out to be the same [0,1] x [0,1]

So I did the following calculation (both integrals going from 0 to 1)

[tex]\int \int \sqrt{u + v} * (1) dudv[/tex]

which resulted in a value of roughly 3.238.

Does my logic and answer seem sound here? Thanks in advance.
 
  • #4
I doubt that you will find that polar coordinats ARE particularly suitable. The crucial point is that the area you are integrating over is a square, not a disk.

It's not all that difficult to integrate in x,y. Integrating first with respect to y, let
y/x= tan(θ) Then x2+ y2= x2(1+ (y/x)2)= x2(1+ tan2(x))= x2sec2(\theta) so that
[tex]\sqrt{x2+ y2}= xsec(\theta)[/tex]
 
  • #5
HallsofIvy said:
I doubt that you will find that polar coordinats ARE particularly suitable. The crucial point is that the area you are integrating over is a square, not a disk.

It's not all that difficult to integrate in x,y. Integrating first with respect to y, let
y/x= tan(θ) Then x2+ y2= x2(1+ (y/x)2)= x2(1+ tan2(x))= x2sec2(\theta) so that
[tex]\sqrt{x2+ y2}= xsec(\theta)[/tex]

Thanks very much HallsofIvy for your reply. I would have simply integrated with respect to x and y, but I specifically have to integrate using change of variables. I did so, as I mentioned above, by doing the following:

I set u = x^2, v =y^2, and then calculated the jacobian of T which was 1. The image transformation limits of integration for u and v turned out to be the same [0,1] x [0,1]

So I did the following calculation (both integrals going from 0 to 1)

[tex]\int \int \sqrt{u + v} * (1) dudv[/tex]


which resulted in a value of roughly 3.238.

Turned about to be actually a much cleaner calculation than simply doing it with respect to x and y, but I just wondered if I got the correct answer.

Does my logic and answer seem sound here? Thanks again
 
  • #6
ninjacookies said:
Thanks very much HallsofIvy for your reply. I would have simply integrated with respect to x and y, but I specifically have to integrate using change of variables. I did so, as I mentioned above, by doing the following:

I set u = x^2, v =y^2, and then calculated the jacobian of T which was 1. The image transformation limits of integration for u and v turned out to be the same [0,1] x [0,1]

So I did the following calculation (both integrals going from 0 to 1)

[tex]\int \int \sqrt{u + v} * (1) dudv[/tex]


which resulted in a value of roughly 3.238.

Turned about to be actually a much cleaner calculation than simply doing it with respect to x and y, but I just wondered if I got the correct answer.

Does my logic and answer seem sound here? Thanks again
Hi Ninja,
Two things, the first is that you should be aware your transformation is not globally invertible; however, it does happen to be invertible over your region of integration. The next thing is that the Jacobian for your integral is not 1, it is the messy [tex]dx\wedge dy = d(\sqrt{u})\wedge d(\sqrt{v}) = \frac{du}{2\sqrt{u}}\wedge\frac{dv}{2\sqrt{v}} = \frac{du dv}{4\sqrt{uv}}[/tex] which makes the integral much more complicated.
Getting your integral in polar coordinates is actually not that difficult (just refer to the trigonometry of the situation, breaking the square into two triangles). Integrating in polar coordinates, I get something much less than 3.238.
 
Last edited:
  • #7
hypermorphism said:
Hi Ninja,
Two things, the first is that you should be aware your transformation is not globally invertible; however, it does happen to be invertible over your region of integration. The next thing is that the Jacobian for your integral is not 1, it is the messy [tex]dx\wedge dy = d(\sqrt{u})\wedge d(\sqrt{v}) = \frac{du}{2\sqrt{u}}\wedge\frac{dv}{2\sqrt{v}} = \frac{du dv}{4\sqrt{uv}}[/tex] which makes the integral much more complicated.
Getting your integral in polar coordinates is actually not that difficult (just refer to the trigonometry of the situation, breaking the square into two triangles). Integrating in polar coordinates, I get something much less than 3.238.


Thanks very much hypermorphism, and THANKS for catching my fatal flaw with the Jacobian computation...wow was I ever off. I'm just completely lost at this point. I don't really know what you mean by splitting the square into two triangles...I mean I literally know what you're talking about but I don't see how that would help any with doing polar coordinates.

I also have no clue what to do as far as polar coordinates...do you mean, can I just take

r= [tex] \sqrt{x^2 + y^2} [/tex] ? If so, how would I integrate ?

[tex] \int \int \ r * |jacobian| r drd \theta[/tex] And the area of integration would be from 0 to 2pi and then...


ah geez I'm completely lost and desperate for help...any pointers would be greatly appreciate thanks!
 
Last edited:
  • #8
It can't be done in polar coordinates,as Halls explained and as it is pretty obvious by a drawing,the square [0,1]*[0,1] is not a circle of radius 1...

Daniel.
 
  • #9
ninjacookies said:
... can I just take

r= [tex] \sqrt{x^2 + y^2} [/tex] ? If so, how would I integrate ?

[tex] \int \int \ r * |jacobian| r drd \theta[/tex] And the area of integration would be from 0 to 2pi and then...

Draw the square [0,1]x[0,1]. The radius' lower bound for our integral is 0 so we needn't worry anymore about it. The radius' upper bound is going to sweep from (let t=theta) t=0 to t=pi/2. Note that there is a break at t=pi/4 (when the radius is the diagonal of the square). So we shall split our integral at that break and sum the areas of the resulting two triangles.
First we do the lower triangle. Draw a sample radius from the origin to a point on the boundary of the lower triangle. You get a right triangle, and get the relation cos(t) = 1/r, or r = sec(t). For our lower triangle, we then have the integral:
[tex]\int_0^{\frac{\pi}{4}} \int_0^{\sec\theta} r^2 dr d\theta[/tex]
The integrand r^2 is the transformation of [tex]\sqrt{x^2+y^2}=r[/tex] multiplied by the Jacobian [tex]rdrd\theta[/tex].
You can get the bounds for the upper triangle (where t varies from t=pi/4 to t=pi/2) similarly. It's cute that sec(t) and csc(t) are straight orthogonal lines in polar coordinates.
 
Last edited:
  • #10
dextercioby said:
It can't be done in polar coordinates,as Halls explained and as it is pretty obvious by a drawing,the square [0,1]*[0,1] is not a circle of radius 1...

Daniel.


Sorry, I'm being hardheaded. :( I'm just getting these conflicting reports that it wouldn't be 'that hard' to convert to polar coordinates, and now I hear it can't be done at all. So does that mean my original method setting u=x^2 and v=y^2 is the most efficient way? Or are there alternative(s)?
 
  • #11
dextercioby said:
It can't be done in polar coordinates...
Do you just mean it's nontrivial, because the transformation is pretty straightforward. :tongue2:
 
  • #12
What...?No,the 1/4 of the circle of radius 1 in the 1-st quadrant does not cover the whole are of the square [0,1]*[0,1]...

Daniel.
 
  • #13
hypermorphism said:
Draw the square [0,1]x[0,1]. The radius' lower bound for our integral is 0 so we needn't worry anymore about it. The radius' upper bound is going to sweep from (let t=theta) t=0 to t=pi/2. Note that there is a break at t=pi/4 (when the radius is the diagonal of the square). So we shall split our integral at that break and sum the areas of the resulting two triangles.
First we do the lower triangle. Draw a sample radius from the origin to a point on the boundary of the lower triangle. You get a right triangle, and get the relation cos(t) = 1/r, or r = sec(t). For our lower triangle, we then have the integral:
[tex]\int_0^{\frac{\pi}{4}} \int_0^{\sec\theta} r^2 dr d\theta[/tex]
You can get the bounds for the upper triangle (where t varies from t=pi/4 to t=pi/2) similarly. It's cute that sec(t) and csc(t) are straight orthogonal lines in polar coordinates.


Thank you SO much hypermorphism! Wow, you seem to have this stuff down pat. Impressive! I'm still a bit lost as to the orientation of the triangles...are you drawing the triangle from (0,0) to (1,1) and splitting the box that way...or what orientation are you splitting it from? I'm just trying to get a better visual feel of what you are trying to convey.

So for the upper triangle I would just do the following

[tex]\int_{\frac{\pi}{4}}^{\frac{\pi}{2}} \int_0^{\csc\theta} r^2 dr d\theta[/tex]

Or maybe that is a bit off. I think it'll all come together once I get a feel for the graph of the situation. Thanks again!
 
  • #14
dextercioby said:
What...?No,the 1/4 of the circle of radius 1 in the 1-st quadrant does not cover the whole are of the square [0,1]*[0,1]...

Daniel.
Of course not. That's the lower triangle. The upper triangle is from pi/4 to pi/2 and integrates csc(t). I had to let the original poster do *some* work at creating the bounds, or they won't understand the change fully. :tongue2:
 
  • #15
Which lower triangle are u talking about...?The one with a 1/4 of a circle as a curved side...?

Daniel.
 
  • #16
ninjacookies said:
I'm still a bit lost as to the orientation of the triangles...are you drawing the triangle from (0,0) to (1,1) and splitting the box that way...or what orientation are you splitting it from?
Polar coordinates have a variable radius tethered to the origin that holds angle t with the positive x-axis (in reference to Cartesian coordinates). Thus the triangles are formed by the line connecting (0,0) and (sqrt(2), pi/4) in polar coordinates, or in Cartesian the line formed by (0,0) and (1,1).
ninjacookies said:
So for the upper triangle I would just do the following

[tex]\int_{\frac{\pi}{4}}^{\frac{\pi}{2}} \int_0^{\csc\theta} r^2 dr d\theta[/tex]
Yep. :smile:
 
  • #17
dextercioby said:
Which lower triangle are u talking about...?The one with a 1/4 of a circle as a curved side...?

Daniel.
No, that would be
[tex]\int_0^\frac{\pi}{4} \int_0^1 r dr d\theta[/tex]
You do realize that the graph of [tex]r=\sec\theta[/tex] is a straight line in polar coordinates ?
Note that the volume of the triangle
[tex]\int_0^1 \int_0^x dy dx =\frac{1}{2}[/tex]
is easily translated to polar coordinates
[tex]\int_0^{\frac{\pi}{4}} \int_0^{\sec\theta} r dr d\theta = \frac{1}{2}[/tex]
 
Last edited:
  • #19
dextercioby said:
Yes,so what...?

Daniel.
Basically, what are you talking about ?
 
  • #20
I'm just waiting to see what trick you pull to convert the square [0,1]*[0,1] in itself by a change of variable...

Could you come up with a drawing...?

Daniel.
 
  • #21
hypermorphism said:
First we do the lower triangle. Draw a sample radius from the origin to a point on the boundary of the lower triangle. You get a right triangle, and get the relation cos(t) = 1/r, or r = sec(t). For our lower triangle, we then have the integral:
[tex]\int_0^{\frac{\pi}{4}} \int_0^{\sec\theta} r^2 dr d\theta[/tex]
The integrand r^2 is the transformation of [tex]\sqrt{x^2+y^2}=r[/tex] multiplied by the Jacobian [tex]rdrd\theta[/tex].

I'm sort of confused...I thought the Jacobian was a matrix computation of derivatives, and that [tex]rdrd\theta[/tex] was simply a representation of dA, or are the two synonamous? I mean, would I be able to show that the jacobian is [tex]rdrd\theta[/tex] through a derivative matrix?

thanks again!
 
  • #22
ninjacookies said:
I'm sort of confused...I thought the Jacobian was a matrix computation of derivatives, and that [tex]rdrd\theta[/tex] was simply a representation of dA, or are the two synonamous? I mean, would I be able to show that the jacobian is [tex]rdrd\theta[/tex] through a derivative matrix?

thanks again!
Hi ninja,

There are two similar things mathematicians mean when they talk about the Jacobian. The Jacobian used in modern differential geometry is a (IMO) simpler and more algebraic formulation of the Jacobian as used in multivariable calculus, where the Jacobian is just a scalar. The two yield equivalent expressions, but as I find the DG expression more intuitive (and easier to write than a matrix!), I use that expression instead. Your matrix will yield only r, while the algebra of differential forms allows DG to include drdt.
 
  • #23
dextercioby said:
I'm just waiting to see what trick you pull to convert the square [0,1]*[0,1] in itself by a change of variable...

Could you come up with a drawing...?

Daniel.
Sure. As soon as I'm done taking out the garbage. Fun to be at home. :tongue2:
 
  • #24
OK, I'm an idiot. I forgot my math book and I don't have the formula for integrals regarding csc and sec for powers larger than 2...could you please help?

I'm trying to take the integrals of [tex]\csc^3\theta d\theta[/tex] and [tex]\sec^3\theta d\theta[/tex]


I'm kinda in a rush as I need to turn this in within an hour and a half

thanks again!
 
  • #25
dextercioby said:
I'm just waiting to see what trick you pull to convert the square [0,1]*[0,1] in itself by a change of variable...

Could you come up with a drawing...?

Daniel.
Right. So here is
The Story of Polar Coordinates and The Unit Square!
The closed unit square is defined as the subset of R^2 [0,1]x[0,1]. As the boundary of the closed square has 2-dimensional measure 0, we will refer to both the closed and open unit squares as simply the unit square. We will assume that Cartesian coordinates are well-known. Polar coordinates are related to Cartesian coordinates (x,y) by the transformation T(x,y) = ([tex]\sqrt{x^2+y^2}[/tex], arctan(y/x)) = (r, t) wherever the transformation is well-defined and the continuous extension elsewhere.
Note that the lines that define the unit square in Cartesian coordinates are x=1, x=0 and y=1, y=0. We want to split the unit square along its diagonal thusly:
Unit square
because of the way polar coordinates vary. The diagonal represents a fundamental break in the behavior of whatever overlying function defines the upper bounds of the unit square, so unless the equations tell us otherwise, we will assume we need a piecewise cover broken at the diagonal. In Cartesian coordinates, our regions (triangles) are then easily translated.
We transform the lower triangle first. The line x=1 is the set of points {(1, y)} which transforms to the set of points {([tex]\sqrt{1+y^2}[/tex], arctan(y))} in (r,t) coordinates. Thus y = tan(t) and r = [tex]\sqrt{1 + tan^2\theta}[/tex] = sec(t) is the equation of the line represented in Cartesian coordinates by x=1. Thus the lower triangle in the diagram is bounded by the polar equations r=0 to r=sec(t) where t varies from 0 to pi/4. In order to see this, work backwards from the bounds and see whether you end up with the triangle pictured.
The line y=1 is similarly r=csc(t). The further bounds for the upper triangle are trivial and are already in the thread. Of course, I didn't do all this formal stuff; I just noticed the geometry with respect to sweeping r and related it to polar coordinates. You can easily graph the functions r=csc(t), r=sec(t), t=0, and t=pi/2 to see the unit square they bound.
 

Attachments

  • unitsquare.png
    unitsquare.png
    1.4 KB · Views: 685
  • #26
Wow, that was an excellent explanation. I can't thank you enough! :)


However, the abtiderivative of [tex]csc^3\theta[/tex] is [tex]csc\theta(cot^2\theta +1)[/tex] (if I'm correct) for t goes from pi/4 to pi/2, isn't [tex]cot^3\theta[/tex] undefined for theta = pi/2 ? Since the cotangent is just 1/tan...and tangent is undefined for tan (pi/2). ? So I'm confused how I would continue on this calculation?

I got [tex]\sqrt{2} /3 [/tex] for the lower triangle...now I'm stuck on the upper triangle.

Any help would be appreciated...thanks!
 
  • #27
ninjacookies said:
OK, I'm an idiot. I forgot my math book and I don't have the formula for integrals regarding csc and sec for powers larger than 2...could you please help?

I'm trying to take the integrals of [tex]\csc^3\theta d\theta[/tex] and [tex]\sec^3\theta d\theta[/tex]


I'm kinda in a rush as I need to turn this in within an hour and a half

thanks again!
Use the identity cos^2(t) + sin^2(t) = 1 to derive 1 + tan^2(t) = sec^2(t) and remember d(tan(t)) = sec^2(t). Unfortunately, there's no fast way to integrate this other than application of integration by parts and using trig identities. The answer is a pretty ugly bunch of natural logs, but it works. You may do well to find a more convenient bunch of coordinates, if possible. :biggrin:

PS. the antiderivative of csc^3(t) is unfortunately not that simple. :frown: What are the steps you took to get there ?
 
Last edited:
  • #28
I kinda had an itch the antiderivates weren't that easy to compute :( Now I only have 20 minutes left... :( He said we could use a calculator to compute the integrals instead of doing all the computation by hand, but unfortunately I have a very outdated ti-85 and not one of those new shiny ti-92's or whatever. I'm so sorry to ask this of you, but since you already said you found the answer for both triangles, could you please let me know what you got? It's times like this I wish I had the extra 100 plus dollars for a new calculator, but unfortunately I don't.

I cannot thank you enough...I owe you big time. :)
 
  • #29
ninjacookies said:
I kinda had an itch the antiderivates weren't that easy to compute :( Now I only have 20 minutes left... :( He said we could use a calculator to compute the integrals instead of doing all the computation by hand, but unfortunately I have a very outdated ti-85 and not one of those new shiny ti-92's or whatever. I'm so sorry to ask this of you, but since you already said you found the answer for both triangles, could you please let me know what you got? It's times like this I wish I had the extra 100 plus dollars for a new calculator, but unfortunately I don't.

I cannot thank you enough...I owe you big time. :)
Heya ninja,
Wolfram Research provides an integrator online as a sample of their Mathematica Suite. Type in "(Sec[x])^3" to get an unwieldy symbolic expression for the integral and similarly for Csc[x]. :smile:
My numerical integrator (the free GraphCalc) gives ~1.147/3 for the lower triangle and ~1.147/3 for the upper triangle (makes sense considering the symmetry of the surface).

Edit:Forgot to divide by 3.
 
Last edited:
  • #30
hypermorphism said:
Of course not. That's the lower triangle. The upper triangle is from pi/4 to pi/2 and integrates csc(t). I had to let the original poster do *some* work at creating the bounds, or they won't understand the change fully. :tongue2:

That was quite impressive Hyper...But does it really matters to calculate the other one too...
It seems obvious that both of them are equal and if u are calculating the above one with cosec ...what is the problem calculating with sec..
i am not getting the exact feel.Pls help...
 
  • #31
heman said:
That was quite impressive Hyper...But does it really matters to calculate the other one too...
It seems obvious that both of them are equal and if u are calculating the above one with cosec
Hi heman,
You're right. Since the surface {(r, t, r)} (polar/cylindrical coords) is symmetric with respect to t, it's sufficient to compute the integral above one of the triangles and multiply by 2. For surfaces without symmetry, we don't inherit that convenience, though. :smile:
 
  • #32
that i realize Hyper...But why did u write the Cosec For the above triangle..What is the Problem with Sec...Does the eqn of the line y=1 was to be written or how the r is varying ...Pls Help
 
  • #33
heman said:
that i realize Hyper...But why did u write the Cosec For the above triangle..What is the Problem with Sec...Does the eqn of the line y=1 was to be written or how the r is varying ...Pls Help
Hi heman,
If you look at the square, you will see that for the upper triangle, if we measure by the angle the radius makes with the line t=pi/2 (the y-axis), we get the relationship cos(t0) = 1/r. t0 is related to the t of polar coordinates by t0 = pi/2 - t, so we have 1/r = cos(pi/2 - t) = sin(t), so r = 1/sin(t) = csc(t).
 

1. What is a change of variables in scientific research?

A change of variables is a mathematical technique used to transform a set of variables in a problem into a new set of variables. This transformation can simplify the problem and make it easier to solve, or it can help reveal underlying patterns or relationships.

2. When is it necessary to use a change of variables in scientific experiments?

A change of variables is often used in scientific experiments when the original set of variables is complex or difficult to work with. It can also be used to convert between different units of measurement or to make a problem more amenable to analysis.

3. How do you choose the appropriate change of variables for a problem?

The appropriate change of variables for a problem depends on the specific variables involved and the desired outcome. It is important to carefully consider the properties of the original variables and how they relate to each other before selecting a transformation.

4. Can a change of variables affect the outcome of a scientific experiment?

Yes, a change of variables can affect the outcome of a scientific experiment. By altering the variables in a problem, the resulting solution or data may also change. This is why it is important to carefully consider the implications of a change of variables before applying it to a problem.

5. Are there any limitations to using a change of variables in scientific research?

While a change of variables can be a useful tool in scientific research, there are some limitations to consider. In some cases, the transformation may introduce additional complexity or may not be applicable to certain types of problems. It is important to carefully evaluate the potential limitations before using a change of variables in a research project.

Similar threads

Replies
2
Views
292
  • Calculus
Replies
29
Views
719
Replies
2
Views
1K
Replies
1
Views
1K
Replies
2
Views
1K
Replies
1
Views
818
  • Calculus
Replies
3
Views
1K
Replies
3
Views
648
Replies
12
Views
1K
Back
Top