  The aim of this paper is to study the molecular composition in the
circumstellar envelope around the oxygen-rich star IK Tau. We observed IK Tau
in several (sub)millimeter bands using the APEX telescope during three
observing periods. To determine the spatial distribution of the
$\mathrm{^{12}CO(3-2)}$ emission, mapping observations were performed. To
constrain the physical conditions in the circumstellar envelope, multiple
rotational CO emission lines were modeled using a non local thermodynamic
equilibrium radiative transfer code. The rotational temperatures and the
abundances of the other molecules were obtained assuming local thermodynamic
equilibrium. An oxygen-rich Asymptotic Giant Branch star has been surveyed in
the submillimeter wavelength range. Thirty four transitions of twelve molecular
species, including maser lines, were detected. The kinetic temperature of the
envelope was determined and the molecular abundance fractions of the molecules
were estimated. The deduced molecular abundances were compared with
observations and modeling from the literature and agree within a factor of 10,
except for SO$_2$, which is found to be almost a factor 100 stronger than
predicted by chemical models. From this study, we found that IK Tau is a good
laboratory to study the conditions in circumstellar envelopes around
oxygen-rich stars with (sub)millimeter-wavelength molecular lines. We could
also expect from this study that the molecules in the circumstellar envelope
can be explained more faithful by non-LTE analysis with lower and higher
transition lines than by simple LTE analysis with only lower transition lines.
In particular, the observed CO line profiles could be well reproduced by a
simple expanding envelope model with a power law structure.
