Direction of Integration of Electrostatic force over a circular arc, direction of the resultant force changing with interchange in limits?

Problem:

A uniformly charged circular arc with linear charge density $$m$$ subtends angle $$\theta$$, find the net force acting on a charge placed at its center if total charge of the arc is $$Q$$ and the charge at center is $$q$$.

Here, we take the line of symmetry for the arc and integrate the components of force acting along it i.e: $$2\dfrac{kqm}r\int_{0}^{\theta /2}(\cos x)$$ We get: $$2kqm\dfrac{\sin(\theta / 2)}r$$

If we integrate from $$\theta/2$$ to $$0$$, we get negative value ($$k = 9 \times 10^9$$, $$r$$ = radius of arc)

I wanted to know, why is the sign changing when we add the same thing in different ways. Is there a rule to know how to decide the limits or its just the faulty mechanism or there is actual change in direction of force.

I was thinking that it actually rotates the axes about y axis, where positive z axis is decided by using right thumb rule hence as the force acts on x axis, the sign gets flipped. Just a speculation.

• Hello and welcome to Physics SE! When posting, please make sure to format your question with the correct punctuation, spellings, and capitalization. Use LaTeX to format symbols and math. – Yejus Jul 30 '20 at 16:43
• Thank you for the edit, sorry i am new to the platform, i will be more careful from the next time – Harshavardhan Hajeri Jul 30 '20 at 17:00
• This is just a pure mathematics question concerning integrals in calculus, when you change the direction you have to add another negative sign is all. – Triatticus Jul 30 '20 at 18:05
• What Triatticus said. If you like, this is because even though you are still just adding the forces, if you start from $\theta /2$ and go to 0, then your $d \theta$ is negative because it's decreasing so you have to add a minus sign – Brain Stroke Patient Jul 30 '20 at 18:07
• Thank you Triatticus and Brain Stroke Patient for explaining.. i really appreciate your help – Harshavardhan Hajeri Jul 30 '20 at 18:14