Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Convert spherical to cartesian coordinates' topicStudent Support Forum > General > Archives > "Convert spherical to cartesian coordinates"

Next Comment >Help | Reply To Topic
Author Comment/Response
Miles
02/05/12 6:51pm

Hello,

I am trying to convert the following (example) expression:

Cos[\[Phi]]*Sin[\[Theta]]^2*Sin[\[Phi]]

To cartesian coordinates using the following rules:

shToCartesian = {Cos[\[Theta]] -> z, Sin[\[Phi]] Sin[\[Theta]] -> y,
Cos[\[Phi]] Sin[\[Theta]] -> x}

But applying it as follows:

Cos[\[Phi]]*Sin[\[Theta]]^2*Sin[\[Phi]] //. shToCartesian

Does not perform any replacements:

Out := Cos[\[Phi]] Sin[\[Theta]]^2 Sin[\[Phi]]

Whereas the expected answer is:

Out := xy

Is there a way to coax Mathematics to perform this transformation?

Cheers,
Miles



URL: ,

Subject (listing for 'Convert spherical to cartesian coordinates')
Author Date Posted
Convert spherical to cartesian coordinates Miles 02/05/12 6:51pm
Re: Convert spherical to cartesian coordinates Bill Simpson 02/09/12 11:52pm
Re: Re: Convert spherical to cartesian coordina... Miles 02/14/12 8:39pm
Next Comment >Help | Reply To Topic