  Differential operators and integral operators are linked together by the
first fundamental theorem of calculus. Based on this principle, the notion of a
differential Rota-Baxter algebra was proposed by Guo and Keigher from an
algebraic abstraction point of view. Recently, the subject has attracted more
attention since it is associated with many areas in mathematics, such as
integro-differential algebras. This paper considers differential algebras,
Rota-Baxter algebras and differential Rota-Baxter algebras in the
quasi-idempotent operator context. We establish a Gr\"obner-Shirshov basis for
free commutative quasi-idempotent differential algebras (resp. Rota-Baxter
algebras, resp. differential Rota-Baxter algebras). This provides a linear
basis of free object in each of the three corresponding categories by
Composition-Diamond lemma.
