# Total Variation of a function

hi,

I have to calculate total variation of this function:

1 for x< 0
sin(pi * x) for 0<= x <= 3
2 for x> 3

I could not find any example for doing this. Can someone help me ?

mathman
It is straightfoward: at x=0, the function jumps from 1 to 0 (var = 1); from 0 to pi/2, it goes from 0 up to 1 (var = 1); from pi/2 to 3pi/2, it goes down from 1 to -1 (var = 2); etc.

I'll let you do the rest. Then add up all the individual variations to get the total.

It is straightfoward: at x=0, the function jumps from 1 to 0 (var = 1); from 0 to pi/2, it goes from 0 up to 1 (var = 1); from pi/2 to 3pi/2, it goes down from 1 to -1 (var = 2); etc.

I'll let you do the rest. Then add up all the individual variations to get the total.

I had only used for the sin(pi*x) the function of the total variation( given in the picture, attached), because it is differentiable, for the other jumps I have used the same idea like you.

Do you certainly know that I should take max, min points of the sinus function ?

#### Attachments

• 2.2 KB Views: 342
mathman