Show that if $a < b$ are in the interval $\left[0, \frac{\pi}{2}\right]$ then $a - \sin a < b - \sin b$. Is this true for $a < b$ in the interval $\left[\pi,\frac{3\pi}{2}\right]$?
1. **Define the function and its derivative:**
   Let \( f(x) = x - \sin x \). To analyze the behavior of \( f(x) \), we first compute its derivative:
   \[
   f'(x) = \frac{d}{dx}(x - \sin x) = 1 - \cos x.
   \]

2. **Analyze the derivative on the interval \(\left[0, \frac{\pi}{2}\right]\):**
   On the interval \(\left[0, \frac{\pi}{2}\right]\), the cosine function \(\cos x\) takes values from \(\cos 0 = 1\) to \(\cos \frac{\pi}{2} = 0\). Therefore, \(1 - \cos x\) ranges from \(0\) to \(1\):
   \[
   0 \leq 1 - \cos x \leq 1.
   \]
   Since \(f'(x) \geq 0\) for all \(x\) in \(\left[0, \frac{\pi}{2}\right]\), \(f(x)\) is a non-decreasing function on this interval.

3. **Conclusion for the interval \(\left[0, \frac{\pi}{2}\right]\):**
   Because \(f(x)\) is non-decreasing on \(\left[0, \frac{\pi}{2}\right]\), if \(a < b\) within this interval, then:
   \[
   f(a) < f(b) \implies a - \sin a < b - \sin b.
   \]

4. **Analyze the derivative on the interval \(\left[\pi, \frac{3\pi}{2}\right]\):**
   On the interval \(\left[\pi, \frac{3\pi}{2}\right]\), the cosine function \(\cos x\) takes values from \(\cos \pi = -1\) to \(\cos \frac{3\pi}{2} = 0\). Therefore, \(1 - \cos x\) ranges from \(2\) to \(1\):
   \[
   1 \leq 1 - \cos x \leq 2.
   \]
   Since \(f'(x) > 0\) for all \(x\) in \(\left[\pi, \frac{3\pi}{2}\right]\), \(f(x)\) is strictly increasing on this interval.

5. **Conclusion for the interval \(\left[\pi, \frac{3\pi}{2}\right]\):**
   Because \(f(x)\) is strictly increasing on \(\left[\pi, \frac{3\pi}{2}\right]\), if \(a < b\) within this interval, then:
   \[
   f(a) < f(b) \implies a - \sin a < b - \sin b.
   \]

The final answer is \( \boxed{ a - \sin a < b - \sin b } \) for both intervals \(\left[0, \frac{\pi}{2}\right]\) and \(\left[\pi, \frac{3\pi}{2}\right]\).