We prove an extension of the Ocone–Karatzas integral representation, valid for all functions on the classical Wiener space. We also establish an elementary chain rule formula and combine the two results to compute explicit integral representations for some classes of composite random variables.