Oxford Calculus: Jacobians Explained

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello maths fans dr tom crawford here at the university of oxford to teach you about 2d jacobians jacobians are used in integrals when changing coordinate systems geometrically they represent the stretch factor when you switch to a different set of coordinates the reason we might want to change coordinates in an integral is that some problems which look very difficult in cartesian coordinates for example working out the area of the unit circle become much easier if you switch to a different system for circles this means using polar coordinates where instead of measuring vertical and horizontal distances we instead measure the angle theta and the distance r from the origin as usual with the oxford calculus series i recommend you check out the free maple calculator app which is really helpful for visualizing 2d and 3d functions as well as for checking your answers when calculating partial derivatives both of which are going to be essential skills you'll need when working through this video when working out the area of a shape what we are doing is dividing it up into small pieces so here we have a circle divided up into these rectangle shapes and as the pieces get smaller so for example if i add more grid lines to this picture you can see that we are able to more accurately represent the actual shape so in these areas where the edge of our shape is actually rounded with each rectangle we're going to have to decide whether to overestimate or underestimate the area so here for example we might take this one and then perhaps we take this one then this one and of course we're going to take all of these inside ones and this kind of idea will continue and as we make these pieces smaller we get closer and closer to the curvature of the circle and therefore closer and closer to the actual area of our shape in the limit as the area of these pieces goes to zero we will get the exact answer and the integral sign is what represents this limiting process let's look at the unit circle in a little more detail now in cartesian coordinates the area is equal to the double integral over the unit circle x squared plus y squared is less than or equal to one and i'm integrating with respect to x and with respect to y and i'm integrating just the number one so this will give me the area of this circle now as i mentioned this is difficult because we don't know the explicit limits for x and y sure we could try and figure them out but it's a little bit tricky it's much easier as we will see to figure it out in polar coordinates using r and theta and that's why we want to make this coordinate change and therefore why we need to know the jacobian in this formula the dxdy term represents a small piece of the area of our shape just like in my previous diagram so here what we're doing is dividing up the circle just as i did before into these small rectangular pieces of width dx and of height d y now as we change into polar coordinates rather than having a horizontal and vertical lined grid what we actually get are going to be circles which represent a constant radius and we also get things which we call rays which are these straight lines which represent different constant angles from the origin so in our new coordinate system our original rectangle of width dx and height dy has now actually been transformed into this curved shape which represents a sector of a circle and you can see this in our diagram over here where this curved rectangular shape is now representing a small piece of area that previously looked like a rectangle now with our coordinate transformation remember the jacobian is representing this stretch factor so it's representing how this piece of area which of course we know here this has area just equal to base times height as a rectangle so what we need to know is how is this transformed in polar coordinates so we need to know the area of this section of a circle just like in our rectangle dx represents a small change in the horizontal direction and d y a small change in our other variable the vertical direction we want to try and include d theta a small change in our angle and d r a small change in our radius because r and theta of course are our new coordinate system so what we do is you extend this back to the origin and then we say that this small angle here is equal to d theta this is our small change in our angle and then if we mark this first inner radius as r then the outer radius is going to be r plus a small change dr and so the total width will be dr what we're going to do at this stage is actually approximate this curved shape as a rectangle now this might seem almost like cheating at this point but bear with me because in the limiting process which remember is what happens when we do the integral what we're actually doing is allowing d theta to tend to zero and dr to tend to zero so just like we did with dx and dy in order to get the exact answer in the form of an integral by allowing the total area to shrink to zero and having infinitely many of them we do the exact same here and this does in fact mean you will have to trust me on this that approximating this as a rectangle doesn't actually matter because those higher order terms will disappear in that limiting process so we need to know the height of our rectangle so we're approximating it as a rectangle and we're going to say that the width of our rectangle is going to be dr this small change in the radius now for the height we kind of have two choices we can either take the inner arc length or we can take the outer arc length now fortunately we do have a formula for arc length given that we know the angle at the center so what we have here let's take the inner one what we have is a fraction of the total circumference of this circle so we know that the total circumference is of course 2 pi times the radius where r is the value of our radius for this inner arc but we only have d theta out of 2 pi of the total distance so the arc length on the inside will just be r d theta and it's this value r d theta that we're going to use as the height of our rectangle so therefore we can say the area in cartesian coordinates given by dx dy in polar coordinates it's actually transforming [Music] into d r r d theta or as i'm going to write r d r d theta and this factor of r here is going to be our stretch factor this is our jacobian because what we figured out is when changing from x and y variables we can just say this is equal to the integral over the unit circle so over r less than or equal to one the number one doesn't change and we've now figured out that dx by dy transforms to drd theta are new variables and we have this stretch factor given by r and here we figured it out geometrically to give us the jacobian but of course there's going to be a general formula which is what we're going to look at in a moment so the new formula is just r d r d theta and just to convince you that this has really simplified the area integral let's just do that calculation so we need to know the limits on the radius well looking at the unit circle we're going from zero out to a radius of one so r is going from zero to one much easier to figure that one out than it was to try and figure out x and y and similarly for theta it's a lot more straightforward because we're going all the way around from zero on the x-axis right the way through to two pi so our limits are simply theta equals naught to two pi and again remembering our jacobian r d r d theta now we can just do the theta integral because there's no theta term inside the integral sine so that will just give us theta times r and of course we evaluate that at the 2 equals 0 and 2 pi and then we have a dr in the end so then substituting in those limits for theta we just get 2 pi times r so finally we have to do the integral from r equals naught to one two pi r times d r and again we can just do the r integral quite straight forwards that just becomes two pi r squared over 2 so those twos will cancel and then when we substitute in the values of autumn 1 we're just going to get pi which of course we did know was going to be the answer because the area of a circle is pi times the radius squared here the radius is one so of course the unit circle has area equal to pi which is what we got here whilst this has hopefully given you a feel for how jacobians work showing the area of a circle is pi times the radius squared isn't exactly groundbreaking so let's try to derive the general jacobian formula for any coordinate change suppose i want to calculate the integral of a function f of x and y with respect to x and y but i know that this will be much simpler if i change to a different coordinate system let's call it u and v so i can say this is equal to f as a function of g of u and v of h of u and v plus my jacobian d u d v and here i'm saying we have a formula that tells me that x can be expressed in terms of our new coordinate system u and v so that's the relationship between the coordinates and y similarly is given by some function h of u and v and of course i've included j here this is our jacobian which remember is our scaling factor or our stretch factor for the change in area when we switch from x y to u v when calculating our jacobian the trick is to think about what happens to a small piece of area just like we did with polar coordinates and our circle example so again for cartesians we have a rectangle representing a small piece of area which has width dx and height dy now because we're considering a general coordinate change to any coordinate system u and v we don't know the exact shape that this will turn into but just like with the circle example and polar coordinates we didn't consider the exact curved shape that we ended up with ultimately we ended up approximating it again as a rectangle we just had to figure out the appropriate dimensions so what you do here for this general coordinate case is we actually say the rectangle will be pushed and squashed and moved over a little bit into a parallelogram and determining the general formula for our jacobian is going to mean finding the area of this parallelogram for those of you wondering why we use a parallelogram you can justify this using taylor expansions and doing the full limiting process but that is beyond the scope of this video and what i want to teach you here but if you're interested you can check it out and you can see that again when we take that limiting process the parallelogram actually gives you all the terms you need to get the exact stretch factor and the exact new area the area of a parallelogram is given by the length of the base times the height so if i add in a line here and label this h h is our unknown height and what we're going to do is say that the base and the top are given by the vector a so that means the length of this line of the base is the length of our vector a and let's suppose this side is given by vector b and so therefore its length is given by the length of our vector b so the area is going to be equal to the length of a which is the base multiplied by h the height and we can figure out the height using some simple trigonometry if i label this angle as theta then i can say that sine of theta is equal to opposite which is h over the hypotenuse which is the length of b and so therefore h is actually going to be the length of b times sine theta so the area is the length of a times the length of b times sine theta that is the area of our parallelogram now hopefully some of you will recognize this formula and this is why i chose to express these lengths in terms of vectors because this formula here is in fact the cross or vector product between the vectors a and b so the area of this parallelogram with base given by vector a and a vector b representing the slanted side this actually has area equal to the vector or cross product a cross b so now we have the area of our parallelogram and remember the area of our original rectangle is the x d y so what this is telling us geometrically we're seeing that a small piece of area as a rectangle in the cartesian plane x and y coordinates is transforming into some general parallelogram and the area there is a cross b where a and b are the vectors describing the two sides of our parallelogram so in order to get the formula for this area we now just need to work out how do we represent our vectors a and b to calculate the vectors a and b we actually have to use the relationship between our two coordinate systems so we start off with a horizontal line of length dx so we can say that that's dx in the i direction now when we then change to the u and v coordinates this of course will be shifted this will change now because x is a function of both u and v what we actually have to think about here is that there could be both a horizontal and vertical component once we make the transformation of this original vector so our new vector might look something like this and we need to know this horizontal and this vertical component now this component will be dx by du and then we multiply by delta u so that overall we're sort of left with just a dx component and similarly this component will be dx by dv multiplied by delta v and again that's going to be the vertical component so our original horizontal line on our rectangle has now got an angle it's the vector a for the base of our parallelogram and the two components it will now have both a horizontal and a vertical component from this coordinate transformation now this can be a little tricky to get your head around you can also show this using taylor expansions but i think i prefer this geometrical interpretation because we expect this to shift and it to actually have these two components and before we just had dx but now x is a function of u and v so we have to sort of use a chain rule type approach to do a dx by du term and a dx by dv term the vertical component d y which was previously just in the j direction is going to behave very similarly so that will be shifted maybe it now has an angle like so and again we need to know those two horizontal and vertical components so just like with x the horizontal piece is going to be d y by d u times delta u in the i component and then we're going to get d y by dv times delta v in that j component putting this all together we can say that our rectangle small piece of area of width dx height dy and area equal to dx dy this transforms into a parallelogram where we know the vector along the bottom a is equal to dx by du delta u i plus dx by dv delta v j and on the side we have b is equal to d y by d u delta u i plus d y by d v delta v j and as we calculated before the area is a cross b to compute the cross or vector product we use determinants so a cross b is equal to the determinant where the top line is i j k for our vector components then for a we have dx by du delta u now i component for j we have v delta v and we have zero for k and then for b we have y u delta u i component and then y v delta v j and then zero for the k now of course the area is in fact equal to the modulus or the size of a cross b and so expanding in this third column like so we can see that we get x u delta u multiplied by yv delta v and then subtract x v delta v times y u delta u so this is our final formula for the area of our parallelogram and therefore how dxdy transforms under this change in general variables tidying this all up we can say that our area dx dy transforms to dx by du multiplied by dy by dv minus dx by dv multiplied by dy by du and then we have a common factor of delta u and delta v on the outside and of course when we plug this into our integral and actually take that limit as delta u and delta v tend to zero these will become d u and dv which is exactly what we wanted and our jacobian is given by this formula so in summary if we want to convert an integral of a function of x and y dx dy into an integral in a new coordinate system let's call it u and v where remember x is some function of u and v and y can also be expressed as some function of u and v then we get f of g u v comma h u v multiplied by our jacobian j d u d v where as we've just calculated the jacobian j is equal to the determinant of a matrix which we found to be equal to dx by d u d y by dv minus dx by dv dy by du and if we want to express that as a determinant you can say this is equal to the determinant of the matrix where you have x u x v on the top and y u y v on the bottom finally let's just check that this general formula works for our original example for the unit circle so remember we were changing from x and y cartesian coordinates to polar coordinates and in polar coordinates we know that x is equal to r cos theta and y is equal to r sine theta and this just follows from basic trigonometry now according to our general formula for the jacobian we need to calculate the derivatives of x with respect to our two new coordinates so we need to know what is dx by dr well that's just cos theta and we also need to know what is dx by d theta so you differentiate cos and you will get i want to say minus sign and then same for y d y by d r is just sine theta and you differentiate sine and you get cos so that's r cos theta so now we have the four partial derivatives we need to plug into our jacobian formula so we will get j is equal to the determinant of cos theta minus r sine theta sine theta r cos theta so calculating that determinant we will get equals r times cos squared theta minus minus plus r times sine squared theta and of course we can factor out the r and then you're left with cos squared plus sine squared which is what so the jacobian is equal to r which of course is exactly what we found to our geometrical considerations so this is a good sanity check all that work we did to get our general formula it does indeed hold for our simple first example if you want to test yourself with some practice questions on jacobians i've put together this worksheet in maple learn which you can access for free by clicking on the link in the video description have fun as always thank you everyone for watching please do remember to subscribe if you've enjoyed the video and i'll see you all very soon take care
Info
Channel: Tom Rocks Maths
Views: 63,606
Rating: 4.9474335 out of 5
Keywords: jacobian, coordinate system, coordinate change, changing coordinates in integral, integration jacobian, jacobian integral, jacobian determinant, parallelogram area, vector product, polar coordinates, polar coordinate jacobian, jacobian derivation, jacobian explanation, cross product, vector cross product, oxford calculus, oxford university, oxford maths, oxford mathematician, tomrocksmaths, tom rocks maths, tom crawford, stretch factor, partial derivatives, vector calculus
Id: YqMelRryG8U
Channel Id: undefined
Length: 29min 25sec (1765 seconds)
Published: Thu Sep 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.