Within the framework of second-order Rayleigh-Schrödinger perturbation theory, the effects of the interaction of the electrons and longitudinal optical phonons in low-dimensional semiconducting heterostructures can be investigated in a unified way. As a result, the ground-state energy for polarons confined in a general potential can be explicitly expressed as a one-dimensional integral. Moreover, some interesting problems, such as those of polarons in quantum wells, quantum wires, and quantum dots, can be readily addressed just by taking different limits. Finally, in a general sense, it is shown on the basis of numerical calculations that the polaronic effect is enhanced with lowering dimensionality and increasing asymmetry.