Try to calculate arithmetic mean of this periodic function I'm trying to do a arithmetic mean of this periodic function:

I choose this subintervals:
$$f(t)= \left\{ \begin{array}{lcc}
             \frac{-2A}{t_0} t &   if  & \frac{-t_0}{2} \leq t < 0\\
             \frac{2A}{t_0}t &  if & 0 \leq t < \frac{-t_0}{2}
             \end{array}
   \right.$$
General formula
$$\overline{x}(t) = \frac{1}{T}\int_{-\infty}^{\infty} x(t) dt$$
So, for this problem
$$\overline{x}(t) = \frac{1}{t_0}\left(\int_{\frac{-t_0}{2}}^0 \frac{-2A}{t_0}t dt + \int_{0}^{\frac{t_0}{2}} \frac{2A}{t_0}t dt\right)$$
I try to calculate it manually and always I get $0$, and I think thay this is imposible because is an even function, also if I put this formula in wolframalpha and get:
$$\overline{x}(t) = \frac{A}{2}$$
Thanks for your approach.

Just do it very carefully:
\begin{align}\overline{f}(t) &= \frac{1}{t_0}\int_{\frac{-t_0}{2}}^\frac{t_0}{2} f(t)\,dt\\
&= \frac{1}{t_0}\left(\int_{\frac{-t_0}{2}}^0 \frac{-2A}{t_0}t\,dt + \int_{0}^{\frac{t_0}{2}} \frac{2A}{t_0}t\,dt\right) \\
&= \frac{1}{t_0}\left(\left(-\frac{A}{t_0}t^2\right)\Bigg|^0_{-\frac{t_0}{2}} + \frac{A}{t_0}t^2\Bigg|^0_{-\frac{t_0}{2}}\right)\\
&= \frac{1}{t_0}\left(0 - \left(-\frac{At_0^2}{4t_0}\right) + \frac{At_0^2}{4t_0} - 0\right)\\
&= \frac{1}{t_0}\cdot\frac{At_0}{2t_0}\\
&= \frac{A}{2}
\end{align}
Note that the general formula is in fact 
$$\overline{f}(t) = \frac{1}{T}\int_{a}^{a+T} f(t) \,dt, \text{ for some } a \in \mathbb{R}$$
so in this case you took $a = -\frac{t_0}{2}$ and correctly calculated that
$$f(t)\Big|_{\left[-\frac{t_0}{2}, \frac{t_0}{2}\right]} = \begin{cases}
-\frac{2A}{t_0}t,  & \text{if $t \in \left[-\frac{t_0}{2}, 0\right\rangle$} \\
\frac{2A}{t_0}t, & \text{if $t \in \left[0, \frac{t_0}{2}\right]$}
\end{cases}$$
