- #1
Les talons
- 28
- 0
Homework Statement
Sketch each of the following vector fields.
[itex] E_5 = \hat \phi r [/itex]
[itex] E_6 = \hat r \sin(\phi) [/itex]
I wish to determine the [itex] \hat x [/itex] and [itex] \hat y [/itex] components for the vector fields so that I can plot them using the quiver function in MATLAB.
Homework Equations
A cylindrical coordinate is given by [itex] (r, \phi, z) [/itex]
[itex] r = \sqrt[+]{x^2 + y^2} [/itex]
[itex] \phi = \arctan(y/x) [/itex]
[itex] z = z [/itex]
Transformation from cylindrical coordinates into Cartesian coordinates:
[itex] \hat x = \hat r \cos(\phi) - \hat \phi \sin(\phi) [/itex]
[itex] \hat y = \hat r \sin(\phi) + \hat \phi \cos(\phi) [/itex]
The Attempt at a Solution
[itex] E_5 = \hat \phi r [/itex]
Since the given vector field [itex] E_5 [/itex] only has a [itex] \hat \phi [/itex] component,
[itex] \hat x = \hat r \cos(\phi) - \hat \phi \sin(\phi) = 0 \cos(\phi) - r \sin(\phi) = - \sqrt[+]{x^2 + y^2} \sin(\phi) [/itex]
Then I transformed [itex] \phi [/itex] in terms of [itex] x [/itex] and [itex] y [/itex] based on the definition of a cylindrical coordinate
[itex] \hat x = - \sqrt{x^2 + y^2} \sin(\arctan(y/x)) = \displaystyle \frac{-y \sqrt{x^2 + y^2} }{x \sqrt{1 +y^2 /x^2} } [/itex]
I followed the same approach for the [itex] \hat y [/itex] component
[itex] \hat y = \hat r \sin(\phi) + \hat \phi \cos(\phi) = 0 \sin(\phi) + r \cos(\phi) = \sqrt[+]{x^2 + y^2} \cos(\phi) [/itex]
[itex] \hat y = \sqrt{x^2 + y^2} \cos(\arctan(y/x)) = \displaystyle \frac{\sqrt{x^2 + y^2} }{\sqrt{1 +y^2 /x^2} } [/itex]
Then
[itex] E_5 = - \hat x \displaystyle \frac{y \sqrt{x^2 + y^2} }{x \sqrt{1 +y^2 /x^2} } + \hat y \displaystyle \frac{\sqrt{x^2 + y^2} }{\sqrt{1 +y^2 /x^2} }[/itex]
Is this approach valid? Thanks for helping. I'll post my attempt for [itex] E_6 [/itex] in a little while.
I'm having trouble thinking about the vector field since I'm used to working in Cartesian coordinates, so I can't tell if this makes sense.
Last edited: