Creation of infinite 'step' function

759 Views Asked by At

Suppose I have a simple function such as $(\sin \frac{\pi}{5} x)^2$, and I want to create a 'stepped' function that, for each integer $x$, jumps by $(\sin \frac{\pi}{5} x)^2$ - in effect, a stepped summation of $(\sin \frac{\pi}{5} x)^2$ for integer $x$. Is there anything wrong with writing it like this?

$$\sum_{x=0}^{\lfloor x \rfloor} (\sin \frac{\pi}{5} \lfloor x \rfloor)^2$$

This seems logical to me:

  • $x=0$ yields $(\sin \frac{\pi}{5} 0)^2=0$
  • $x=1$ yields $(\sin \frac{\pi}{5} 0)^2+(\sin \frac{\pi}{5} 1)^2=0+0.345=0.345$
  • $x=3$ yields $(\sin \frac{\pi}{5} 0)^2+(\sin \frac{\pi}{5} 1)^2+(\sin \frac{\pi}{5} 3)^2=0+0.345+0.904=1.249$
  • etc

Not only does it seem logical to me, but it works - as you can see from this Mathematica plot, which is exactly what I was trying to create:

enter image description here

But I'm confused. I used this general construction ($\sum_{x=0}^{\lfloor x \rfloor}$) on another post (hopefully now deleted as it was pretty garbled), and got shot down for creating an expression that 'wasn't meaningful'.

So, is there a correct way to create the stepped function outlined above? Or do I have the construction right, and I was simply communicating poorly in previous posts?

1

There are 1 best solutions below

0
On BEST ANSWER

The problem is your summation: $$\sum_{x=0}^{\lfloor x \rfloor}$$ This causes confusion because how can the upper bound depend on the running variable itself? The solution is to define a new variable for the summation: $$\sum_{k=0}^{\lfloor x \rfloor} (\sin \frac{\pi}{5} \lfloor k \rfloor)^2.$$