I need an upside-down parabola that grows from 0 to 1/2, then decreases symmetrically from 1/2 to 1. So I've opted for the following:
$f(x) = 1-2\left(x-\frac{1}{2}\right)^2$
But I also need to be able to adjust the "sharpness" of the parabola, which I've found I can do using a parameter, that I'm calling N:
$g(N,x) = 1-N\left(x-\frac{1}{2}\right)^2$
The higher N is, the sharper my parabola becomes. The trouble is that I'd like all parabolas (for all values of N between 0 and 4) to have the same integral over [0,1], and I can't figure out how to scale it. I have a feeling that I could multiply it by some expression that depends on N, but cannot figure out which one.
$h(N,x) = M\left(1-N\left(x-\frac{1}{2}\right)^2\right)$
I figured out how to scale the integral (I can provide some details if they're at all useful) but not how to scale the original function. What does M have to be to ensure that the integral is always the same for all N in ]0,4[?
Note that I talk about scaling, but adding a constant might also be satisfactory, as long as the parabola is always strictly positive over [0,1], which is also why I'm restricting N to ]0,4[. Ideally, the integral would not just be constant be equal to 1 (which I realise cannot be the case for my values of N without using a scaling factor or an additional constant), but I can live without it.
$$\int_{0}^{1} 1-N\left(x-\frac{1}{2}\right)^2 \mathrm{d}x=1-\frac{N}{12}$$ So: $$\frac{1}{1-\frac{N}{12}}\int_{0}^{1} 1-N\left(x-\frac{1}{2}\right)^2 \mathrm{d}x=1$$ So for $M=C*\frac{12}{12-N}$ the integral $$\int_0^1 M*\left(1-N\left(x-\frac{1}{2}\right)^2 \right)\mathrm{d}x=C$$