1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to plot vector function

  1. Jul 15, 2011 #1
    Hi
    How do I plot this vector function
    F(x,y) = i + cos x j where i and j are unit vectors
    Spose I take
    x = 0, then the components in i and y direction are 1, 1
    x = pi/4, then " " 1, 1/sq rt 2
    x = pi/2 " " 1, 0

    This doesnt look corect

    TIA
     
  2. jcsd
  3. Jul 15, 2011 #2
    That's how you plot it. Remember that, if the function F is defined in terms of Cartesian coordinates, x just means the x coordinate, not the angle of the point from the x-axis.
     

    Attached Files:

  4. Jul 15, 2011 #3
    Thabk you
    My doubt is as follows :
    When x = 0, the comp ibn i direction is 1 and in j dirn is 1
    When x= pi/4 = 0.78, the comp in i dirn is 1 and in j is 1/sq rt 2
    When x= 3pi/4 = 2.36, the comp in i dirn is 1 and in j is -1/sq rt 2
    When x = pi/2 = 1.57, the comp in i dirn is 1 and in j is 0, and so on

    But here the comp in i dirn is always 1 while j is varying.

    How then do you get the sinusoidal shape ?

    TIA
     
  5. Jul 15, 2011 #4
    I'm not sure I get what your doubt is. Could you say what you expect it to look like?
     
  6. Jul 15, 2011 #5
    Thank you for the reply.
    My question is : How do I plot this vector function manually

    F(x,y) = i + cos x j where i and j are unit vectors
    Spose I take
    (i) When x = 0, the comp in i direction is 1 and in j dirn is 1
    (ii) When x= pi/4 = 0.78, the comp in i dirn is 1 and in j is 0.707
    (iii) When x = pi/2 = 1.57, the comp in i dirn is 1 and in j is 0
    (iv) When x= 3pi/4 = 2.36, the comp in i dirn is 1 and in j is -0.707
    and so on
    To plot, I have to locate the tail of vector and draw the arrow in the direction given by the i and j components.
    eg. in (i) the x for the tail is 0 and dirn is given by 1 and 1
    (ii) the x for the tail is 0.78, dirn is given by 1 and 0.707
    But what are the y values of the tail in these cases ?

    TIA
     
  7. Jul 15, 2011 #6
    Okay, take the vector (1,1). When x = 0, we can calculate that F(x,y) = (1,1). But this is true for all values of y. If you look at the plot I posted, you'll see that all the vectors along the vertical line where x =0 are identical. That's because the output doesn't depend on the value of y. So if you're asking where is the tail of the vector (1,1) = i + j, such that x = 0, there's no one, unique answer: y can equal any real number. Likewise, when F(x,y) = (1,0,707), y can take any value.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook