Step 1: Understanding the Concept:
For Rolle's theorem on \([0, \pi]\), the function must be continuous, differentiable and satisfy \(f(0) = f(\pi)\). The polynomial plus sine is smooth, so only the endpoint condition gives an equation.
Step 2: Key Formula or Approach:
1. \(f(0) = f(\pi)\).
2. \(f'(x) = 2ax + b + \cos x\), and the slope at \(x = \dfrac{\pi}{4}\) is zero.
Step 3: Detailed Explanation:
\(f(0) = 0\) and \(f(\pi) = a\pi^2 + b\pi + 0\). Setting them equal:
\[ a\pi^2 + b\pi = 0 \Rightarrow b = -a\pi \]
Slope at \(\dfrac{\pi}{4}\):
\[ 2a\cdot\frac{\pi}{4} + b + \cos\frac{\pi}{4} = 0 \Rightarrow \frac{a\pi}{2} + b + \frac{\sqrt2}{2} = 0 \]
Substitute \(b = -a\pi\):
\[ \frac{a\pi}{2} - a\pi + \frac{\sqrt2}{2} = 0 \Rightarrow -\frac{a\pi}{2} = -\frac{\sqrt2}{2} \Rightarrow a = \frac{\sqrt2}{\pi} \]
Then \(b = -\sqrt2\). So
\[ a - b = \frac{\sqrt2}{\pi} + \sqrt2 = \frac{\sqrt2(1+\pi)}{\pi} \]
Option (A) and (C) have the factor \((1-\pi)\) or \((\pi-1)\), which come from a sign error in \(b\). Option (B) has \(2+\pi\), which comes from using \(\cos\frac\pi4 = \sqrt2\) instead of \(\frac{\sqrt2}{2}\).
Final Answer:
\(a - b = \dfrac{\sqrt2(\pi+1)}{\pi}\), option (D).
\[ \boxed{\frac{\sqrt2(\pi+1)}{\pi} \text{ (D)}} \]