TITLE: Variable in upper bound of sum
QUESTION [6 upvotes]: I need to find a solution $x$ of the following equation:
$$\sum_{n=0}^{\left[\frac{0.9}{x}\right]} (1-nx) = 45$$
where $[.]$ denotes the nearest integer function.
I am an engineer and I'm currently making an accelerated beam that needs to send a pulse of 100ns after a period of waiting time. That wait period is equal to (1-nx). I want that, after 45 seconds, I want to get a frequency of 10Hz at the end of the 45 seconds (so the wait time has become 0.1). I have 1Hz at the beginning.
I have divided the problem in two: $$\sum_{n=0}^i (1-nx) = 45$$
where $i$ is the integer that comes closest to satisfying
$$1-ix = 0.1,$$
i.e., $i$ is the integer nearest to ${0.9\over x}$.
But now, I'm concerned; is this even possible in discrete form? IS there a way to know if this is a valid equation? I have never encountered variables in sum bounds... and didn't find a way out of it on the internet. I think I might not be using the proper technique, maybe this is something else than a sum.
I love maths, but I might just be bad at it.
Educate me !

REPLY [2 votes]: This is mostly a comment on the fine answer by r.e.s.  
As r.e.s. shows, if $a$ is the nearest integer to $9\over10x$, then
$$x=2{a-44\over a(a+1)}$$
That is, we are looking for (positive) integer solutions to
$${9a(a+1)\over20(a-44)}=a+r$$
with $|r|\le{1\over2}$. (There is a potential ambiguity if there is a solution with $|r|={1\over2}$, but we'll see that this doesn't occur.) This can be rewritten as
$$-10\le{a(889-11a)\over a-44}\le10$$
For $a\gt44$, these inequalities becomes
$$11a^2-899a+440\lt0\lt11a^2-879a-440$$
while for $a\lt44$ the inequalities signs are reversed. This gives two intervals in which to look:
$$\left({879+\sqrt{879^2+44\cdot440}\over22},{899+\sqrt{899^2-44\cdot440}\over22} \right)\approx(80.40656,81.23487)$$
and
$$\left({879-\sqrt{879^2+44\cdot440}\over22},{899-\sqrt{899^2-44\cdot440}\over22} \right)\approx(-0.49747,0.492399)$$
The first interval contains the relevant integer value $a=81$, with the corresponding value $x=2(81-44)/(81\cdot82)=37/3321$. The second interval contains only the irrelevant integer value $a=0$. We thus see that the solution found by r.e.s. is unique.