# Homework Help: Cartesian to Spherical with a point

1. Jan 20, 2010

### xsever

1. The problem statement, all variables and given/known data
Transform the vector A = x2 - y5 + z3 into spherical coordinates at (x= -2, y= 3, z=1 ).

2. Relevant equations
http://www.equationsheet.com/eqninfo/Equation-0348.html
http://en.wikipedia.org/wiki/Spherical_coordinate_system

3. The attempt at a solution

I know the transformation matrix and the transformation formulas from Cartesian to Spherical, but how do I incorporate the given point (-2,3,1) ?

Thank you.

2. Jan 20, 2010

### LCKurtz

Your question doesn't make any sense. A is an expression or a function of x,y,z, not a vector. What did you really mean to ask?

3. Jan 20, 2010

### vela

Staff Emeritus
I'm guessing that you mean $\vec{A}=2\hat{x}-5\hat{y}+3\hat{z}$ and that the problem is to express this vector in terms of the spherical basis vectors at the point $(x,y,z)=(-2,3,1)$. Does this sound right?

Unlike the basis vectors for Cartesian coordinates, the basis vectors for spherical coordinates are not constant. Their directions depend on what point you're talking about.

4. Jan 20, 2010

### xsever

I have written the problem exactly as it was written in the book. I modified nothing and this is why I could not solve it and came here.

Any thoughts/questions ?

5. Jan 20, 2010

### vela

Staff Emeritus
I'm sure there is typographical information you're omitting, otherwise as LCKurtz said, the problem doesn't make sense because A would not be a vector. Keep in mind, unlike you, we don't know the context in which this problem is asked. We have no idea what material you're covering in class or in the book unless you tell us. That information could provide a clue as to what the problem is asking.

6. Jan 20, 2010

### xsever

I scanned the question just to confirm that I did not miss anything:

The course is Engineering Electromagnetics and this question is in chapter 1. The chapter covers coordinate systems and transformations.

7. Jan 20, 2010

### xsever

Here is what I was thinking: The point (-2,3,1) should be transformed into spherical form. Then, vector A would be transformed using the matrix. As the matrix contains cos(theta) and cos(phi), those theta and phi values would be used from the transformation of the point.

Does this make any sense?

8. Jan 20, 2010

### vela

Staff Emeritus
Depends on the matrix. What it is used for? I assume it maps something to something else. What are the something and something else?

9. Jan 20, 2010

### xsever

The matrix will take a vector from cartesian to spherical.

Here it is:

10. Jan 20, 2010

### vela

Staff Emeritus
Looks good.

11. Jan 20, 2010

### xsever

By using the method I mentioned, I am not getting the right answer.

The right answer is: A= -R4.276 - (theta)4.299 + (phi)1.1094.

If anyone can get that answer, please let me know of the method used.

Thanks.

12. Jan 20, 2010

### vela

Staff Emeritus
I just tried what you described and got the right answer. Check your work.

13. Jan 20, 2010

### xsever

I got
R=$$\sqrt{14}$$
$$\theta$$=1.3
$$\phi$$=-0.982

Therefore, my matrix looks like this:

[AR ] [.535 -.801 .267 ] [2]
[A$$\theta$$] [ .148 -.222 -.963] [-5]
[A$$\phi$$] [.831 .555 0 ] [3]

And the answer I am getting from it is wrong.

Thank you,

14. Jan 20, 2010

### vela

Staff Emeritus
Your value for $\phi$ is wrong.

15. Jan 20, 2010

### xsever

In my book, $$\phi$$=tan-1 (y/x) = tan-1 (3/-2) = -0.982.

Where is my mistake ?

16. Jan 20, 2010

### vela

Staff Emeritus
Think about where the point is and what $\phi$ represents. Is -0.982 a reasonable answer?

17. Jan 20, 2010

### xsever

I know that $$\phi$$(radians) is negative and that would mean it is on the negative side. Doing 2$$\pi$$-0.982 will result in the same trigonometric values.

I am sorry but I do not see what you are trying to explain to me.

18. Jan 20, 2010

### vela

Staff Emeritus
Take the values for $r$, $\theta$, and $\phi$ you got and calculate the cartesian coordinates. Then your mistake will be apparent.

19. Jan 20, 2010

### xsever

Well, I can see that the signs are opposite, but playing with the sign or even$$\pi$$/2 does not do the job.

Wow! I am really not seeing this !

20. Jan 20, 2010

### vela

Staff Emeritus
If the signs are opposite, that's a rotation through what angle?