Let's take into consideration a system of two charges, with magnitudes $q_1$ and $q_2$.Let's assume that the charge with magnitude $q_1$ is placed at the point $A$ and also assume that a point $B$ is at the distance of $r_1$ from $A$ and another point $C$ is at a distance of $r_2$ from $A$. Points $A$, $B$ and $C$ are collinear. The diagram below will make the above statements clearer.
The charge $q_2$ will further be moved to the point $B$ from $C$
The thing that I was mainly wondering about was why we don't take a calculus-based approach when evaluating something like the work done when we push/pull an object of a certain mass, with a certain force, over a certain distance.
That's when I thought that the force between $q_1$ and $q_2$ is changing with the change in position of $q_2$, unlike the situation described above, where the force applied by us is constant.
[Note : I do know that the force applied by us while pushing or pulling something may not be constant but I say this just because that's the situation in most of the examples that I'm familiar with]
Here's what the derivation for work done when $q_2$ moves from $C$ to $B$ is given in my textbook :
Let's assume that the charge $q_2$ suffers a tiny displacement $dr$, so the work done will be $F.dr = \dfrac{q_1q_2}{4\pi\varepsilon_0r_2^{\text{ }2}}dr$.
Hence, the total work done will be the sum of all these little work(s) done as $q_2$ moves from $C$ to $B$ which can be written as
$$W = \int_{r_2}^{r_1}\dfrac{q_1q_2}{4\pi\varepsilon_0r^2}dr$$
The above stated expression is further simplified as $\dfrac{q_1q_2}{4\pi\varepsilon_0}\Bigg ( \dfrac{1}{r_1}-\dfrac{1}{r_2} \Bigg )$.
Is the idea that we approach this problem using calculus because of the continuous change in force as $q_2$ changes its position correct?
Pardon me if this is something obvious because I'm an absolute beginner to calculus.