APEXCalculus / APEXCalculusPTX

In-progress conversion of APEX Calculus to PreTeXt
6 stars 20 forks source link

Div, grad, curl in other coordinates #319

Open sean-fitzpatrick opened 2 days ago

sean-fitzpatrick commented 2 days ago

Question for @APEXCalculus.

Something that the engineering and physics students rely on a lot is the ability to write the "del" operator in other coordinates, and in particular, spherical coordinates.

Is that something that you'd be interested in including somewhere in the last chapter?

It's partly an exercise in chain rule, but you have the added complication that instead of the i,j,k unit vectors, you want to use a moving frame adapted to the spherical coordinate system: unit vectors that point in the directions of increasing rho, theta, and phi.

Related: have you had any feedback on the change to spherical coordinates that we made a few years ago? (I think this was suggested by @Alex-Jordan) My observations so far are that the math (and math education) students like it, or are indifferent. The engineering and physics students hate it. But then again, they would hate the version we were using before. All of them see spherical coordinates in Physics a semester or two before they see them in calculus. And when they first learn it in physics, polar coordinates are (rho,phi), and spherical coordinates are (r,theta,phi), where theta is the polar angle, and phi is the azimuthal angle.

APEXCalculus commented 2 days ago

Not opposed to including the del operator in other coordinates. It is also something I have zero experience with and would have to spend time getting caught up to speed. So it wouldn't be on my near-term to-do list. I know you have your hands full so no pressure for you to write it, either. If you want the challenge, go for it.

I've gotten zero feedback on the spherical coordinate system. I think the physicists do it wrong. My oldest daughter is a freshman physics major and had to find the "bearing" in a poorly worded word problem about a plane moving across the sky. Turns out the mystery angle wasn't the angle of elevation like normal people would use; it was the angle from the y-axis. Dumb.

On Wed, Oct 9, 2024 at 4:44 PM Sean Fitzpatrick @.***> wrote:

Question for @APEXCalculus https://github.com/APEXCalculus.

Something that the engineering and physics students rely on a lot is the ability to write the "del" operator in other coordinates, and in particular, spherical coordinates.

Is that something that you'd be interested in including somewhere in the last chapter?

It's partly an exercise in chain rule, but you have the added complication that instead of the i,j,k unit vectors, you want to use a moving frame adapted to the spherical coordinate system: unit vectors that point in the directions of increasing rho, theta, and phi.

Related: have you had any feedback on the change to spherical coordinates that we made a few years ago? (I think this was suggested by @Alex-Jordan https://github.com/Alex-Jordan) My observations so far are that the math (and math education) students like it, or are indifferent. The engineering and physics students hate it. But then again, they would hate the version we were using before. All of them see spherical coordinates in Physics a semester or two before they see them in calculus. And when they first learn it in physics, polar coordinates are (rho,phi), and spherical coordinates are (r,theta,phi), where theta is the polar angle, and phi is the azimuthal angle.

— Reply to this email directly, view it on GitHub https://github.com/APEXCalculus/APEXCalculusPTX/issues/319, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABT5OF56CV5OJ4MT4JVKOC3Z2WIT3AVCNFSM6AAAAABPVLGJHOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3TMOJRGY2DOMY . You are receiving this because you were mentioned.Message ID: @.***>

sean-fitzpatrick commented 1 day ago

In Astronomy they often use angle of elevation. But elsewhere in Physics they measure from the north pole. That's the standard in most calculus books, too, and was the case in APEX as well until we changed it.

The one thing that was different in APEX was the ordering of coordinates: before we made all the changes, APEX used the order (rho,theta,phi), with phi measured from the z axis, and theta measured in the xy plane.

This results in a left-handed coordinate system. That doesn't impact the calculus so much, but can cause problems elsewhere. One resolution is to simply use the order (rho,phi,theta). This is what you'll find, for example, in Stewart. But we kept the (rho,theta,phi) order, and changed how phi is measured.

I thought at bit about rewriting the del operator in other coordinates, and it's a fun exercise, but maybe best left for Physics. You need to be willing to either talk about arc length elements, or work with the Jacobian matrix as a change of basis matrix. (The latter requires more linear algebra than you'd want to assume for the book.)

For polar coordinates in the plane, here is what it looks like, using arc length rather than the Jacobian matrix.

Consider an arc length vector quantity:

ds = i dx + j dy

In polar, it should become

ds = e_r dr + e_theta (r d theta),

where e_r and e_theta are unit vectors pointing in the directions of increasing r and theta at a point.

But x=r cos(theta) and y = r sin(theta), so dx = cos(theta) dr - sin(theta) (r d theta) and dy = sin(theta) dr + cos(theta) (r d theta).

Plug these into ds = dx i + dy j, collect things in terms of dr and r d theta, then set it equal to the polar version of ds.

You find e_r = cos(theta) i + sin(theta) j and e_theta = -sin(theta) i + cos(theta) j

And of course you can rearrange to solve for i and j in terms of e_r and e_theta.

Then you take \nabla = i (d/dx) + i (d/dy), and sub in two things:

Rearrange, gather terms, and you get the polar version of the del operator. It simplifies nicely: \nabla = e_r (d/dr) +e_theta (1/r) (d/dtheta)

Spherical coordinates is similar, but more complicated. Maybe not right for the book. But fun.

Here's the Wikipedia take on it.