A particle moves in a plane with an acceleration which is parallel to the axis of y and varies as the distance from the axis of x. Show that
(a) when the acceleration is a repulsion, the equation of its path is
y = Aa^x + Ba^(-x) ,
(b) when the acceleration is attractive, the equation of its path is
y = Acos(ax + B) .