Why do we use a calculus based approach for calculating the work done when a charge moves a certain distance in a system of two charges? 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.
 A: Well, this is an extremely simple example to elucidate what I had already said in the comments.
First off, Work is defined as: $$ W = \vec F. \vec d$$
where, $\vec F$ is the force applied and $\vec d$ is the displacement. We have taken the dot product of $\vec F$ & $\vec d$ because Work is a scalar quantity. It can be simplified as $$ W =  Fd\cos{\theta}$$ where, $\theta$ is the angle between $\vec F$ and $\vec d$.
A simple yet intuitive example is when a rain drop falls down to the earth. You may be aware that a raindrop falls down because of the downward gravitational force applied by the earth.
So, if a raindrop fall down from a height $h$ and has a mass $m$, the work done by the earth on the raindrop will simply be:
$$ W = \vec F. \vec d$$
Here, $\vec F = mg$, where $g$ is the acceleration due to gravity. Also, if you notice, the displacement (i.e. $h$) and the force acting on the rain drop (i.e. $mg$) are acting along the same direction (i.e. downwards). So, the angle between them will be $0$, and $cos\ 0 = 1$. So, the work done reduces to
$$W = (mg).(h).cos\ 0$$
i.e. $$W = mgh$$
Hope that you understood this example!
Note: This requires a primitive understanding of vectors and and their products
Edit: Calculus based example:
Suppose there is a woman pushing a block. She applies a constant force of $\vec F = 50\ N$. Now, the block moves along a smooth, horizontal surface. Let's set a reference axis now. Let the horizontal surface be the x - axis. Now, let's say the block moves a distance of $2\ m$ from the time of application of the constant force.
If we consider the origin to be at the point where the block initially is, the work done would simple be written as:
$$\int dW\ = \int_{x=0}^{x=2}  F. dx.cos\ 0$$
where, $dx$ is an infinitesimal displacement
Again, the angle between the force and the displacement is zero and $F$ is constant, so they can be taken out of the integration. Also, the integration of $dx$ is simply $x$.
So it simplifies as:
$$W\ = 20\ [2-0]$$
Hence,  $W=\ 40\ J$
Hope that this served the purpose!
