I am uncomfortable with your definition of the triangle waveform. I would define the function and express your limits of integration in terms of the period. To be more general you may need to avoid using 0 as one extreme of the waveform.
So for example the first part would be :
[tex]v = \frac {4(v_m - v_0)t} T + v_0[/tex]
With
[tex]0 \leq t \leq \frac T 4[/tex]
I based this on the coordindate pair
[tex](v_0, 0) ; (v_m , \frac T 4)[/tex]
So this waveform would have miminums of [itex]v_0[/itex] at 0 , [itex]\frac T 2[/itex] and [itex]T[/itex]
and maxs of [itex]v_m[/itex] at [itex]\frac T 4[/itex] and [itex]\frac {3T} 4[/itex]