# Why sum of squares of the magnitudes of Fourier coefficients in Infinite Square Well equals one but it is not so in regular Fourier analysis?

My question is basically this..

In regular math, Fourier Coefficients give the "amount" a particular frequency is available in any periodic signal. The squares of sum of coefficients is not equal to 1 in regular Math course.

But in Quantum Mechanics I'm told that any function can be represented by sum of functions of infinite square well and the sum of squares of magnitudes of coefficients is equal to one(obviously the probability of finding the particle is equal to 1).

Why this discrepancy? What am I missing? All I know is basically every periodic functions is sum of sinusoidal signals with Fourier coefficients...

$$\int_a^b |\psi|^2 dx = 1.$$