This gets brought up quite often here but something people don't talk about is why Fourier needed to do this. Historical context is really fun! In the late 1800s, Fourier wanted to mathematically describe how heat diffuses through solids, aiming to predict how temperature changes over time, such as in a heated metal rod. Observing that temperature variations evolve smoothly, he drew inspiration from the vibrating string problem studied by Euler and D’Alembert, where any complex motion could be expressed as a sum of simple sine waves. Fourier hypothesized that heat distribution might follow a similar principle; that any initial temperature pattern could be decomposed into basic sinusoidal modes, each evolving independently as heat diffused.
> Joseph Fourier (1768–1830) was attracted by the problem of heat diffusion because he wanted to find the ideal (soil) depth to build his cellar so that the wine remained stored at the perfect temperature in the course of a year. He then attempted to understand how the heat would spread across the surface (for a rich Fourier’s biography, we refer to https://mathshistory.st-andrews.ac.uk/Biographies/Fourier/)
But the biography says nothing about wine or cellars. I think the "wine cellar problem" is a kind of textbook application of his work, but I couldn't find any evidence that this was Fourier's motivating problem.
And it is an important correction because Fourier was immediately able to use his technique to solve partial differential equations, but it was many decades later before it was shown how it all works with the rigorous foundation of measure theory and functional analysis.