There may be a fracture in the tooth. It may need a root canal. Also, if there's a fracture, there may be no way to know if a root canal will solve the problem either. The dentist should either examine the tooth or refer you to a root canal specialist.