Trigonometry parametric equation $\sin(\sqrt {ax-x^2})=0 $

From $\sin(\sqrt {ax-x^2})=0 $, we have $x^2-ax+n^2\pi^2=0$ and

$$x_1+x_2 = a, \>\>\>\>a^2-4n^2\pi^2\ge 0$$

which limits $n \le N = [\frac {a}{2\pi} ]$. Then, the sum of roots $(N+1)a=100$ leads to

$$a ([\frac {a}{2\pi} ] +1)=100$$

which yields the solution $a=25$.


Let's assume for simplicity $a>0$, for $a<0$ we take $-x$ in place of $x$.
$y=ax-x^2\ge 0$ gives $0\le x\le a$ and $ax-x^2=c$ has exactly $2$ solutions for each $0\le c< y(\frac{a}{2})=\frac{a^2}{4}$ and exactly one for $c = y(\frac{a}{2})$, so does $u(x)=\sqrt{ax-x^2}=\sqrt{c}$.
On the other hand, $\sin u=0$ gives $u=\pi n,\,n\in\mathbb{Z}$ so we consider $2$ cases: $\sqrt{y(\frac{a}{2})}=\frac{a}{2}=\pi n$ and $a\ne\pi n$.
In the second case $\sin \sqrt{ax-x^2}=0$ for $0\le u\le \frac{a}{2}$ has $N+1$ pairs of roots $x = \frac{1}{2} \left(a \pm \sqrt{a^2 - 4 π^2 k^2}\right),\,0\le k\le N,\,k\in Z$ where $N=\lfloor\frac{a}{2\pi}\rfloor$, each pair sums up to $a$, so we have sum of roots $a\left(\lfloor\frac{a}{2\pi}\rfloor+1\right)$, in the first case we have one more root $\frac{a}{2}$, but $a$ has to be $2\pi n,\,n\in\mathbb{Z},\,n\ge 0$ so $\pi 2n(n+1)+\pi n$ has to be $=100$ for $n\in\mathbb{Z}$, which can't be as $\frac{100}{\pi}\notin \mathbb{Z}$, but has to be $=2n^2+3n\in\mathbb{Z}$.
So we consider $a\left(\lfloor\frac{a}{2\pi}\rfloor+1\right)=100$ and consider all factorizations of $100$ into product of two different positive integers: $(100,1),(50,2),(25,4),(20,5)$, checking only $a=25,\lfloor\frac{a}{2\pi}\rfloor+1=4$ fits.
For $a<0$ the roots count will be positive, but $a$ will be negative, so the sum can't be $=100$. Answer: 25