where: | Q and W | are weighting functions and |

| f_{1} and f_{2} | stand for the continuity and momentum equations. |

According to the Galerkin method the weighting functions *Q, W* are set equal to the approximation functions , for the wanted variables *h* and *(u,v)*. It shall be noted that the approximation functions *,* are different for the depth *h* and the flow velocities *(u,v)*. The program RMA2 for example uses a linear function for and a square function for .

Partial differentiation and the Gauss theorem are applied to the weighted intergrals from Eq. 3-61. This does **not** apply to the continuity equation since it does not have any second-order derivatives that could be reduced. The derivatives with respect to time are not subject to partial differentiation either (see Unsteady problems). When going through the calculation it is important to watch that the boundary integrals that are formed make sense physically.