# Cylindrical Vector Field Equation Convsersion to Cartesian

• sittingOnTheFloor
In summary, the problem is that the expression for the magnetic field in cylindrical coordinates is not given in terms of Cartesian coordinates. The student is struggling to convert the expression for the basis vectors and coordinates in terms of Cartesian coordinates. The student is considering replacing the ##\theta## term with the arctan.
sittingOnTheFloor

## Homework Statement

I have been given a changing magnetic field in cylindrical coordinates. The equation is:

B(r,\phi,z) = - \frac {B_1} {2} r \hat{r} + (B_0 + B_1z)\hat{z}

I need to be able to find the magnetic field as a function of x, y, and z.

From wikipedia,

## The Attempt at a Solution

I am really feeling kinda dumb here I can convert cylindrical coordinates to cartesian just fine I just don't know how to do it with a vector field. I am really struggling with how to turn the rhat term into x and y hats. I know that the theta term is zero so the field doesn't depend on theta, and the z term is easy cause its just z. I know that jacobians are sometimes useful when dealing with changing coordinate systems but i don't know how to use them

sittingOnTheFloor said:
I know that the theta term is zero so the field doesn't depend on theta
This is not true. The cylindric basis vectors ##\hat r## and ##\hat \theta## both depend on ##\theta## and so (since it contains ##\hat r##) will your field. However, that is not the question. The question is how your field is expressed in Cartesian coordinates. What is the problem with just inserting the expression for the basis vectors and coordinates in terms of Cartesian coordinates?

Orodruin said:
This is not true. The cylindric basis vectors ##\hat r## and ##\hat \theta## both depend on ##\theta## and so (since it contains ##\hat r##) will your field. However, that is not the question. The question is how your field is expressed in Cartesian coordinates. What is the problem with just inserting the expression for the basis vectors and coordinates in terms of Cartesian coordinates?

okay this is maybe stemming from my misunderstanding of the ##\theta## term. Are you saying it would be

B(x,y,z) = - \frac {B_1} {2} {\sqrt{(x^2 + y ^ 2}} \hat{x} - {\sin{\theta}} {\cos{\theta}} \hat{y} + (B_0 + B_1z)\hat{z}

because this doesn't feel right to me, I don't feel good about the ##\theta## term

No, you have not inserted the correct expressions for ##r## and ##\hat r##.

shoot didn't properly copy what I had written out

B(x,y,z) = - \frac {B_1} {2} {\sqrt{x^2 + y ^ 2}} {\cos{\theta}} {\sin{\theta}}\hat{x} - {\sin{\theta}} {\cos{\theta}} \hat{y} + (B_0 + B_1z)\hat{z}

You said the r term was wrong though too did you just mean that extra parentheses I forgot to delete or do I have deeper flaws with how I am reading the pictures from the initial thread post?

And if this is correct now, I would be able to just switch out all of the ##\theta##'s for tan^-1(x/y), right?

Deeper flaws. Please write out explicitly gow you think ##\hat r## and ##r## are expressed in Cartesian coordinates.

I am considering ##r## to be equal to ##\sqrt{x^2 + y^2}## and ##\hat r## to be ##\cos{\theta}\sin{\theta}\hat x## which doesn't sit well with me but that is my (knowingly wrong) reading of the attached pictures

Do you know how matrix multiplication works or how to derive the form of the basis vectors?

Well I am pretty sure the matrix multiplication for this

looks like
\begin{bmatrix}
\cos{\theta} \hat x + \sin{\theta} \hat y + 0\hat z \\
-\sin{\theta} \hat x+ \cos{\theta} \hat y + 0 \hat z \\
0 \hat x + 0 \hat y + 1 \hat z
\end{bmatrix}

so does that mean that each row of that matrix is what I should be replacing for ##\hat r##, ##\hat \theta##, and ##\hat z##, respectively?
I think that this would give

B(x,y,z) = (- \frac {B_1} {2} {\sqrt{x^2 + y ^ 2}}) ({\cos{\theta} \hat x + \sin{\theta} \hat y + 0\hat z}) + ({\arctan{\frac {y}{x}}})({-\sin{\theta} + \cos{\theta} \hat y + 0 \hat z}) + ({B_0 + B_1z})({0 \hat x + 0 \hat y + 1 \hat z})

and then I would just need to multiply all of those out and do some like terms matching? I still don't feel good about how I am treating the theta term though

Where did the second term come from? You have no corresponding term in your original expression.

By second term do you mean the arctan? That is what I am most unsure about, because you had said that I do need to take theta into account but from the original equation it is 0, so instead of the arctan should it be 0?

Yes, there is no term proportional to ##\hat\theta##. You also need to clean up your expression to get rid of the angle ##\theta## since you were asked to express it in Cartesian coordinates.

okay, that makes more sense. I can just replace ##\theta## with ##\arctan{\frac {y} {x}}## right, leaving me with

B(x,y,z) = (- \frac {B_1} {2} {\sqrt{x^2 + y ^ 2}}) ({\cos({{\arctan{\frac {y}{x}}}}) \hat x + \sin({{\arctan{\frac {y}{x}}}}) \hat y + 0\hat z}) + ({B_0 + B_1z})({0 \hat x + 0 \hat y + 1 \hat z})

Is that right? It feels a lot better

That looks quite horrible to be honest. I suggest you try to simplify it. Expressing x and y in terms of the cylinder coordinates should help.

Ah right well here's where the context of the problems comes in cause this is actually for a program I have to write so as long as it is right it doesn't matter, and it is necessitated that I do keep it in terms of x, y, and z. But if that is right then I would like to thank you a whole whole lot for helping me with this and putting up with my mild incompetent-ness.

sittingOnTheFloor said:
Ah right well here's where the context of the problems comes in cause this is actually for a program I have to write so as long as it is right it doesn't matter
To be honest, this is neither true nor a very constructive attitude to take. Furthermore, your use of the trigonometric functions result in your expressions not being completely general. If instead you would put some effort in you might learn something and end up with a more useful (and simple) expression. Otherwise this was certainly the last time I help you. I am here to help people who actually want to learn.

sittingOnTheFloor said:
and it is necessitated that I do keep it in terms of x, y, and z.
I never said to put anything else in the end. I said your expression is far messier than it needs to be.

I guess I misunderstood what you meant by expressing x and y in terms of cylinder coordinates then. Could you explain more what you meant by that? And also how do the trig functions make it not completely general?

sittingOnTheFloor said:
I guess I misunderstood what you meant by expressing x and y in terms of cylinder coordinates then
I meant exactly that, but seeing their expression in terms of the cylinder coordinates will make it simpler to identify the Cartesian coordinates in an expression with cylinder coordinates.

sittingOnTheFloor said:
And also how do the trig functions make it not completely general?

The inverse trigonometric functions are dubious. In particular, you can change the sign of both x and y and still have the same quotient x/y so the arctan function you have will actually only be correct for half of the combinations of x and y.

## 1. What is the Cylindrical Vector Field Equation?

The Cylindrical Vector Field Equation is a mathematical formula used to describe vector fields in cylindrical coordinates. It is an important tool in electromagnetism, aerodynamics, and fluid mechanics.

## 2. How is the Cylindrical Vector Field Equation converted to Cartesian coordinates?

The Cylindrical Vector Field Equation can be converted to Cartesian coordinates by using transformation equations that relate the cylindrical coordinates (ρ, θ, z) to the Cartesian coordinates (x, y, z). These equations involve trigonometric functions and are well-defined for all points in space.

## 3. What are the advantages of using the Cylindrical Vector Field Equation in Cartesian form?

Converting the Cylindrical Vector Field Equation to Cartesian coordinates can make it easier to analyze and manipulate the vector field. In Cartesian form, the equations can be represented as a system of linear equations, which can be solved using matrix operations. This allows for more efficient calculations and better visualization of the vector field.

## 4. Can the Cylindrical Vector Field Equation be converted to Cartesian coordinates for all vector fields?

Yes, the Cylindrical Vector Field Equation can be converted to Cartesian coordinates for any vector field that can be described in cylindrical coordinates. However, the conversion process can become more complex for more complicated vector fields.

## 5. Are there any limitations to converting the Cylindrical Vector Field Equation to Cartesian coordinates?

The conversion of the Cylindrical Vector Field Equation to Cartesian coordinates can become more challenging for vector fields with singularities or discontinuities. In these cases, special techniques may be needed to accurately convert the equation.

• Introductory Physics Homework Help
Replies
5
Views
2K
• Introductory Physics Homework Help
Replies
9
Views
2K
• Introductory Physics Homework Help
Replies
2
Views
487
• Introductory Physics Homework Help
Replies
8
Views
206
• Introductory Physics Homework Help
Replies
3
Views
1K
• Introductory Physics Homework Help
Replies
25
Views
388
• Introductory Physics Homework Help
Replies
3
Views
1K
• Introductory Physics Homework Help
Replies
3
Views
2K
• Introductory Physics Homework Help
Replies
2
Views
296
• Introductory Physics Homework Help
Replies
5
Views
2K