LeVeque excercise Total Variation

86 Views Asked by At

In Randall LeVeque Finite Volume Methods I've come across the Exercise 6.2 and 6.4.

6.2 Compute the total variation of a). $$q(x)=\left\{\begin{array}{ll}1&\text{if }x<0\\\sin(\pi x)&\text{if } 0\leq x\leq 3\\2 &\text{if }x>3\end{array}\right.$$

Here with the definition $TV(q)=\int_{-\infty}^{\infty}|q^\prime(x)|dx$ I get $0$ since $\int_0^3\pi\cos(\pi x)=0.$

b). $$q(x)=\left\{\begin{array}{lll}1&\text{if }x<0&\text{or }x=3\\1&\text{if }0\leq x\leq 1&\text{or } 2\leq x<3\\-1&\text{if }1<x<2\\2&\text{if }x>3\end{array}\right.$$

Here the solution is also $0$. But both do not feel right...

6.4 Show that $TV(Q^{n+1}) \leq TV(q^n(\cdot, t_{n+1}))$ is valid by showing that, for any function $q(x)$, if we define discrete values $Q_i$ by averaging $q(x)$ over grid cells, then $TV(Q) \leq TV(q)$.

Hint: Use the definition $TV(q) = sup\sum_{j=1}^n|q(\xi_j) − q(\xi_{j−1})|$, and the fact that the average value of $q$ lies between the maximum and minimum values on each grid cell.

The definition for $TV$ is $TV(Q_i) =\sum_{i=-\infty}^{\infty}|Q_i−Q_{i−1}|$. But how does this leads to the hint and then to the solution?

Thanks in advance :)