I am looking for a bell-shaped periodic function f(x) with parameters a and b, with following characteristics:
( not sure if such function already exists or one can formulate one ) :
- oscillating between zero and a constant non-negative number A.
- Width of bell can be modified through parameter b.
- customizable period of c.
- Preferably easy to calculate its integral
Obviously such function should look like a spike with lower b numbers and conversely turn into square-like with larger b.
I tried playing with Gaussian and normal distribution, it satisfies the first two requirements but fails to drop to zero at periodicals of x = c. something like the picture below
any suggestions highly appreciated !
Best Answer
Try $$ f(x)=Ae^{-\frac{(\ln2)\left(\tan^n \frac{\pi x}{c}\right)}{\tan^n \frac{\pi b}{c}}} $$ for a proper value of $n$ (say, $n=10$).