  Let $V$ be a Weyl module either for a reductive algebraic group $G$ or for
the corresponding quantum group $U_q$. If $G$ is defined over a field of
positive characteristic $p$, respectively if $q$ is a primitive $l$'th root of
unity (in an arbitrary field) then $V$ has a Jantzen filtration. The sum of the
positive terms in this filtration satisfies a well known sum formula. If $T$
denotes a tilting module either for $G$ or $U_q$ then we can similarly filter
the space $\Hom_G(V,T)$, respectively $\Hom_{U_q}(V,T)$ and there is a sum
formula for the positive terms here as well. We give an easy and unified proof
of these two (equivalent) sum formulas. Our approach is based on an Euler type
identity which we show holds without any restrictions on $p$ or $l$. In
particular, we get rid of previous such restrictions in the tilting module
case.
