Nonlinear vibration of a carbon nanotube with waviness along its axis is investigated. The carbon nanotube having a single wall and that is doubly clamped at a source and a drain is used to represent a single-mode resonator. The problem is formulated on the basis of the elastic continuum mechanics theory, where the carbon nanotube is modeled as a harmonically excited beam under a transverse force. The equation of motion involves a quadratic and cubic terms due to the curved geometry and the mid-plane stretching. The dynamics response of the resonator is analyzed in the context of the bifurcation theory. Noteworthy is the nonlinear effect of period doubling turning to chaos.