An oscillating system (in either classical physics or quantum mechanics) that is not oscillating in simple harmonic motion. In general, the problem of an anharmonic oscillator is not exactly soluble, although many systems approximate to harmonic oscillators, and for such systems the anharmonicity (the deviation of the system from being a harmonic oscillator) can be calculated using perturbation theory. If the anharmonicity is large, other approximate or numerical techniques have to be used to solve the problem.