Contractions are somewhat informal, and should generally be used sparingly in academic prose. They can be used to give a stylistic effect of informality, as if addressing the reader directly.
But should the reader have prior experience, their reading of section 2.1 in this chapter needn’t be ferociously meticulous.
If a directly-quoted source text uses a contraction, then the contraction should be repeated exactly as it was written in the original text, even if your text is formal.