# How to construct well-balanced finite volume and discontinuous Galerkin methods for hyperbolic PDEs with source terms?

Source terms, such as those due to bathymetry in the shallow water equations, need to be integrated in a special way in order to preserve physical steady states. Is there a general way to construct well-balanced methods, or does it require special techniques for each equation?

$$u_t = Au + Bu$$
where $A,B$ are some (possibly differential) operators, the steady states are those for which
$$Au + Bu=0.$$
It is common to use a splitting approach in which $A$ and $B$ are discretized in different ways. Then there will be truncation errors associated with each of these discretizations, and the truncation errors will generally not cancel even in the case of a steady state. A classical example (as mentioned in the question) is the shallow water equations with bathymetry, in which $A$ represents convective terms and $B$ represents the momentum forcing due to the variable bottom height. There are many papers published in the last few years that give different ways to exactly maintain the steady state solutions.