# Why should asteroid coming towards a star deflect away from star if gravity is an attractive force?

I was finding the closest approach of an asteroid (whose energy is sufficient to exit the gravitational field of the star )so that it can escape the gravitational field of the planet .The asteroid has a velocity and is being attracted by the planet and is leaving the star. Why should it deflect away from the star like this if gravitational force is attractive? Well I think if I mention the whole question it'll useful so the question is

An asteroid is approaching a star of radius r . The impact parameter is b . Find the minimum value of b for which asteroid will just escape on falling into the star.

My instructor said the drawing should be

Why it shouldn't deflect like this? Instructor said if this happens then it will be orbiting the planet.

• Why would the first drawing be happening? Did you read this somewhere? – Steeven Sep 21 '18 at 9:16
• @Steeven I am asking as the instructor said this. – Nobody recognizeable Sep 21 '18 at 9:17
• My guess is that the comet is actually in orbit around another celestial body and that the planet in the picture simply alters that slightly, but as you said, the velocity is enough to leave the influence of the planet and thus the comet moves away around its original object. – DakkVader Sep 21 '18 at 9:24
• I'm thinking like this, imgur.com/a/FsNEhnh , could this be the case? Does the assignment say anything like this? If you only have the one body, your second image is the correct one. – DakkVader Sep 21 '18 at 10:20
• Fire your instructor and get a new one! – knzhou Sep 21 '18 at 10:27

This is because of angular momentum conservation. Basically, the motion in the $$r$$ coordinate is not only controlled by the gravitational potential $$V(r)$$ but really by the so-called effective potential $$V_{\hbox{eff}}=\frac{\ell^2}{2\mu r^2}+V(r)$$ where $$\ell$$ is the angular momentum of the system. Since the gravitational potential is in $$1/r$$, it is the centrifugal term $$\ell^2/(2\mu r^2)$$ that dominates at small distance, and this is a strongly repulsive potential that “pushes back” the particles towards larger values of $$r$$, preventing the particle from reaching $$r=0$$ unless the angular momentum $$\ell=0$$, i.e unless the particle is directly approaching the planet.
When the particle is far away, the $$\ell^2/(2\mu r^2)$$ term is negligible compared to the gravitational potential so the motion looks purely attractive.