Given the function $ f(x) = \sin^2(\pi x) $, show that $ f \in BV[0, 1] $ I'm learning about functions of bounded variation and need to verify my work to this problem since my textbook does not provide any solution :

Given the function $ f(x) = \sin^2(\pi x) $, show that $ f $ is of bounded variation on $ [0, 1] $. 

Here's my attempt :
$ f'(x) = 2(\sin(\pi x)) \frac{d}{dx}[\sin(\pi x)] = 2\pi \sin(\pi x) \cos(\pi x) = \pi \sin(2 \pi x)$. 
The function $ f $ is differentiable on $ [0, 1] $ and $ \forall x \in [0, 1] $ we have :
$$ \lvert f'(x) \rvert = \lvert \pi\sin(2 \pi x) \rvert \le \pi $$ 
Since the derivative of $ f $ is bounded on $ [0,1] $ this implies that $ f \in BV[0, 1] $.
Is my work correct? 

For a proof from scratch, suppose $f:[0,1]\rightarrow \mathbb R$ has a Lipschitz constant $M$. 
Let $\mathcal P=\left \{ 0,x_{1},\cdots ,x_{n-2},1 \right \}$ be a partition of $[0,1]$. 
Then using MVT, and the Lipschitz assumption, we have with $x_i<x_i^{*}<x_{i+1}$, 
$\sum_{i=0}^{n-1}\left | f(x_{i+1})-f(x_i) \right |\leq \sum_{0}^{n-1}\vert f'(x^{*}_i)(x_{i+1}-x_i)\vert \leq \sum_{0}^{n-1}\vert M(x_{i+1}-x_i)\vert\leq M$ and the result follows as soon as we set $f(x)=\sin ^2(\pi x)$ and note that $f$ has a Lipschitz constant we may take to be $\pi $. 
