  As an algebraic study of differential equations, differential algebras have
been studied for a century and and become an important area of mathematics. In
recent years the area has been expended to the noncommutative associative and
Lie algebra contexts and to the case when the operator identity has a weight in
order to include difference operators and difference algebras. This paper
provides a cohomology theory for differential algebras of any weights. This
gives a uniform approach to both the zero weight case which is similar to the
earlier study of differential Lie algebras, and the non-zero weight case which
poses new challenges. As applications, abelian extensions of a differential
algebra are classified by the second cohomology group. Furthermore, formal
deformations of differential algebras are obtained and the rigidity of a
differential algebra is characterized by the vanishing of the second cohomology
group.
