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 !
Given your comment that you want the upper bound to be the integer closest to $0.9\over x$, the problem can be stated as finding $x$ such that $$\sum_{n=0}^{a(x)} (1-nx) = 45,$$ where $a(x)=\left[{0.9\over x}\right]$ and $[.]$ is the nearest integer function. Now $$\begin{align}\sum_{n=0}^a (1-nx) &= \sum_{n=0}^a 1- \sum_{n=0}^a nx\\ &=\sum_{n=0}^a 1- x\sum_{n=1}^a n\\ &=(a+1) -x\,{a(a+1)\over 2} \end{align}$$
where we've used the formula $\sum_{n=1}^a n={a(a+1)\over 2}$, which Carl Friedrich Gauss supposedly found in his youth (although it was known long before that).
So, we want to solve for $x$ in the following equation: $$(a(x)+1) -x\,{a(x)(a(x)+1)\over 2} = 45.\tag{1}$$
Approximate solution
An approximate solution can be obtained easily by solving equation (1) with $a(x) = {0.9\over x}$ (rather than the nearest integer), yielding $x\approx 0.011136\ldots.$ To find out how good this approximation is, we now obtain the exact solution.
Exact solution
Rearranging equation (1), we get $$x = 2{a(x)-44\over a(x)(a(x)+1)}\tag{2} $$
which provides two observations:
Thus,
giving the exact solution $$x={37\over 3321}=0.\overline{011141222523336344474555856669677807889190003}$$ where the overline indicates the period of the repeating decimal digits.
Here's a plot from Wolfram Alpha showing the exact LHS of equation (1) in blue and the approximated LHS in orange. The solution in each case is the $x$-coordinate where the curve intersects the horizontal line with ordinate $45$:
NB: You were right to be concerned with the possibility that a solution might not exist, although it happens that the value $45$ is a fortunate choice. As the above plot shows, there would be no solutions for values that correspond to the infinitely many "gaps" where discontinuities occur (e.g., in the neighborhood of $45.4$ or $44.8$, say).