In just two measures, Bach outlines the motive for the rest of the piece. The first two bars serve as the expository, and are quickly mimicked by the left hand. Measure 18 brings us to a conclusive Perfect Authentic Cadence, and marks the end of the expository section.
The long trill in the right hand suggests to me to be a transitional section, leading the performer to a developmental section. It sounds as if the piece has modulated to the minor dominant of a minor. The motive is evident in measures such as 26-27. Measure 38 brings us to a PAC, ending the second section.
Doodling and chromaticism leads us back to the recapitulation in measure 44, where we hear the expository section back in the key of d minor. Ending on a PAC, the short invention comes full circle.