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!

Homework Help: Two objects moving at a constant velocity. Find direction so they collide.

  1. Oct 4, 2009 #1
    1. The problem statement, all variables and given/known data
    There is one particle traveling at a constant velocity. Its velocity vector and initial position are known.
    A second particle needs to collide with the first particle. We know the initial position of this particle, and the speed (magnitude of velocity).
    Find the direction that the second particle needs to head in the hit the first particle.
    We can assume the second particle is moving much faster than the first particle, so there will never be a case where the second particle cannot reach the first particle.

    Example: Object A is moving in a straight line and we are trying to "shoot" another object at A so that they collide (like leading a moving enemy in a firefight).

    2. Relevant equations
    Let [tex]p_{1}[/tex] be a particle with a constant velocity
    [tex]v_{1}[/tex] is the vector for the initial velocity of that particle.
    Position: [tex]p_{1} = p_{1_{0}} + v_{1}*t[/tex]
    We know everything there is to know about [tex]p_{1}[/tex] (it's initial position and its velocity vector)

    Let [tex]p_{2}[/tex] be another particle with a constant velocity
    [tex]v_{2}[/tex] is the vector for the initial velocity of that particle.
    Position: [tex]p_{2} = p_{2_{0}} + v_{2}*t[/tex]
    We know the initial position of this particle as well as the magnitude of its velocity. So given its speed and the other objects velocity: what would the direction need to be so that they collide.

    3. The attempt at a solution
    When the collision happens [tex]p_{1} = p_{2}[/tex]; so [tex]p_{1_{0}} + v_{1}*t = p_{2_{0}} + v_{2}*t[/tex]

    We do not know [tex]t[/tex] or [tex]v_{2}[/tex] but we do know [tex]\sqrt{v_{2_{x}}^{2} + v_{2_{y}}^{2}}[/tex]

    I tried splitting up the position equation into an equation for x and a separate equation for y.

    After that I solved for [tex]v_{2_{x}}[/tex] and [tex]v_{2_{y}}[/tex] and then plugged it into the equation for the magnitude.

    I simplified it but it was really complex and I couldn't solve for [tex]t[/tex].
    I'm not sure what to try next.

    p.s. This is an informal question; it's possible that the problem is unsolvable. Also, I can draw a picture and scan it in if necessary.
  2. jcsd
  3. Oct 4, 2009 #2


    User Avatar
    Homework Helper

    It strikes me that you are supposed to continue using the vectors rather than splitting them up into x and y. I think an answer with those vectors in it is called for. I played with it a bit. First off, their positions are equal when they collide, so with t the time of collision you have
    P1 = P2
    P10 + V1*t = P20 + v2*t (1)
    I then solved (1) for t to get an expression for the time of collision. (2)
    I also solved it for the thing we want, v2. (3)
    I subbed (2) into (3) to eliminate the time. Unfortunately the expression for v2 now has another v2 on the right and side so a bit more work is needed to actually solve it for v2.
  4. Oct 4, 2009 #3
    I was playing around with equation (2), the one you got by solving the position equation for t; and I saw that t = some vector divided by another vector. So there is not really anything we can do with that right?

    Also, when you substitute (2) into (3), both of the those equation were derived from the same equation so after simplifying you are left with v2 = v2.

    If this is solvable, I know that the magnitude of v2 will have to be used somewhere. If we don't use that information then there will be infinitely many solutions (the speed that p2 is projected at will determine the direction it needs to go).

    The problem now is that every time I've tried to incorporate the magnitude I'm left with an insanely complex unsolvable equation.
    One attempt:
    k = |v2|; we know what k is.
    Solved |v2| for v2x
    Got: [tex]v2x = \sqrt{k^{2} + v2y^{2}}[/tex]
    I then substituted that into some of the other equations and that's when I got stuck.

    Edit: I also get the feeling that somewhere in all of this I will need to use Calculus. I just don't know what and where. Any ideas?
    Last edited: Oct 4, 2009
  5. Oct 4, 2009 #4


    User Avatar
    Homework Helper

    Wow, I must have been sleepy last night and you are very alert this morning! I'm now convinced that we have to go with the x and y components all right. I like your k and am also using h = magnitude of V1.
    So v2 = (k*cos B, k*sinB), v1 = (h*cos A, h*sin A)
    We are trying to find B.
    I wrote out that the two x coords are equal at collision time t:
    P10x + h*cos(A)*t = P20x + k*cos(B)*t [1]
    and the same for the two y coords. [2]
    Eliminated t between these two equations and got a really long mess. Collected all the cos B and sin B terms together and the mess simplified quite a bit by introducing known constants
    c = P10x - P20x and d = P20y - P10y
    That left kc*sin(B) + kd*cos(B) = hc*sin(A) - hd*cos(A). [6]
    So we can easily calculate c*sin(B) + d*cos(B) from the given information. But how to find B?
    It seems to be crying out for some trig identity and I immediately thought of sin(a+b) = cos(a)*sin(b) + sin(a)*cos(b) but on second thought we can't let c = cos(a) because c may well be much larger than 1. It may not have a "nice" solution, but certainly one could find the angle B by graphing c*sin(B) + d*cos(B) as a function of B and searching numerically for the value of B that makes it equal the correct value.

    I never doubted that there was a solution. After all, a hunter can compute the solution in a second.
  6. Oct 4, 2009 #5
    I think I understand it all now.
    So, I came up with some simple numbers just to see:

    P1 = (0,4)
    V1 = <1,0>

    P2 = (3,0)
    |V2| = 2

    c = -3
    d = -4
    k = 2
    h = 1
    B = ?
    A = 0

    After solving your final equation I ended up with
    -3sinB + -4cosB = (-3sin0 + 4cos0)/2
    simplified to: -3sinB + -4cosB = 2
    I solved this equation with a TI-89 and got B = 150.448 degrees

    Using that value for B I graphed the positions of everything, and it was correct! (they collide at ~2sec at ~p(2,4))

    I still need to do a little more work to the equations before I'm completely finished (I'm hoping to automate the process). Anyway, thank you so much for your help, I think I'm in the clear now.
    Also, this problem ended up being way more complex than I imagined it could ever be.
  7. Oct 4, 2009 #6


    User Avatar
    Homework Helper

    Indeed a terrific problem! If you find an elegant solution for that final trig equation, please let me know.
  8. Oct 4, 2009 #7
    Will do. I've been in the library drinking coffee working on this for the past 6 hours though, so I'm gonna get some sleep. Once I get a presentable result I'll post it.
  9. Oct 5, 2009 #8
    B=-90*(asin((cos(a)*d + sin(a)*c)*h/(\sqrt{c^2+d^2}*k))*pi/90-atan(c/d)*pi/90+(sign(d)-2*(2*i+1))*pi)/(pi)

    where sign(d) = the sign of d
    and i = any positive integer

    p.s. there is also a negative version of this equation, just multiply the right side by -1

    After solving that I get 690 degrees.
    690 - 360 = 330
    330 is 180 degrees off from the real answers, which leaves be to believe that I missed a sign or something somewhere through all of this.

    Anyway, that's basically it. And yes, that has got to be the most hideous thing I have ever seen before.

    When I get back to my dorm I'm going to scan the written out version of the equation and post it (it looks slightly nicer); the thing I posted up there is basically incomprehensible for all intents and purposes.

    Edit: it's highly likely that I made a typo in the above equation
  10. Oct 5, 2009 #9


    User Avatar
    Homework Helper

    Wow! I am very interested in knowing how you did that.
  11. Oct 5, 2009 #10
    The TI-89 has a ridiculously crazy-awesome Algebra System built in.
    All I did was use the "solve()" function on the equation you had posted.
    It took about 5 seconds to calculate and gave me that monstrous equation.
    As for how to accomplish that by hand: I have absolutely no idea.

    On another note, I'm working on programming this equation into a simulator I'm writing.
    I'm calculating the angle B on the fly based on varying systems, and it's working correctly for the most part! I've just got to work out a few more bugs.
  12. Oct 5, 2009 #11


    User Avatar
    Homework Helper

    Most interesting!
    I do programming so I could easily write something to solve for the angle. But having a computer come up with the formula boggles my mind.
  13. Oct 5, 2009 #12
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook