Hey guys,
I suck at math. Suppose I wanted to construct a function that looks like this (pic related). Behaving like a line, but having periodic 'steps'.
What could such a function, I mean the formula, look like?
x+sin(x)
Define it piecewise or use some step punction fuckery.
>>9074154
f(x)= x + (literally any periodic function that ranges from -1 to 1)
>>9074224
[math]\sum\limits_{0\leq k \leq n}{(k\ \bmod\ n)}[/math]
This will give you an integer sequence
>>9074224
how did you come up with that?
>>9074622
I fucked it up
this uses a predicate, expressed by square brackets
I guess you could use this for real n
[math]n -\sum\limits_{0 \leq k \leq n}{[k\ \bmod\ a = 0]}[/math]
>>9074624
The expression arcsin(sin(pi*x)) evaluates sin(pi*x) before applying the arcsin. The result is that the expression won't just be equivalent to pi*x once sin(pi*x) reverses its direction of change at sin(pi/2) and sin(-pi/2); it'll be a cyclical expression. What you get is a triangle wave with a slope that changes from pi to -pi. By multiplying this expression by 2/pi, you get a triangle wave with a slope of ±2. When you add 2x to that triangle wave, it amplifies the +2-slope portions to have a slope of 4, and it attenuates the -2-slope portions to have a slope of 0. The result is a step function constructed from a triangle wave.
I suggest playing with Desmos if you're just interested in the relation of a function to its graph. It's faster than Wolfram and will update in real-time.