$\displaystyle S_n = \sum _{ r=1 }^{ n }{ \big[(r-10)(r-20) \big] }$

Given the above function of $S_n$ , what does the summation below equal to?

$\displaystyle \sum _{ r=1 }^{ 50 } \big|(r-10)(r-20)\big|$

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

$(r-10)(r-20) <0$ only for $r \in ]10,20[$ .

Let $\sum_{r=1}^{n} |(r-10)(r-20)| = A_n$ .

We have: $A_{50}=A_{10}+A_{20}-A_{10}+A_{50}-A_{20}$

$A_n=S_n$ only for $S_n>0$ , and $A_n=-S_n$ only for $S_n<0$ i.e. for $r\in ]10,20[$

Hence, $A_{10}=S_{10}$

$[A_{20}-A_{10}]=-[S_{20}-S_{10}]$

$[ A_{50}-A_{20}]=[ S_{50}-S_{20}]$

So, $A_{50}=A_{10}+A_{20}-A_{10}+A_{50}-A_{20}$

$<=> A_{50}=S_{10}-S_{20}+S_{10}+S_{50}-S_{20}$

Therefore, $\boxed{A_{50}=2S_{10}+S_{50}-2S_{20}}$