A nonlinear oscillator consisting of a linear spring and a mass moving along a straight line is studied both analitically and numerically. The stability of the system without the forcing term is examined by means of Liapunov function. The primary resonance for weakly nonlinear case is studied by use of the method of multiple scales and for general case the periodic and chaotic motions are investigated numerically. It is found that for sufficiently large forcing terms the strange attractor disappears and the system shows the periodic behavior.