Step 1: Understanding the Concept:
A piecewise function is continuous at a boundary point if the left-hand limit, the right-hand limit, and the function value at that point are all equal.
We will set up these equations for $x = \frac{\pi}{2}$.
Step 2: Key Formula or Approach:
For continuity at $x = a$:
$\lim_{x \to a^-} f(x) = \lim_{x \to a^+} f(x) = f(a)$
Step 3: Detailed Explanation:
The given function is:
$f(x) = \begin{cases} mx + 1, & x \le \frac{\pi}{2}
\sin x + n, & x>\frac{\pi}{2} \end{cases}$
We check continuity at $x = \frac{\pi}{2}$.
1. Function value at $x = \frac{\pi}{2}$:
Using the first piece of the function: $f\left(\frac{\pi}{2}\right) = m\left(\frac{\pi}{2}\right) + 1$.
2. Left-hand limit (LHL) as $x \to \left(\frac{\pi}{2}\right)^-$:
$\text{LHL} = \lim_{x \to (\pi/2)^-} (mx + 1) = m\left(\frac{\pi}{2}\right) + 1$.
3. Right-hand limit (RHL) as $x \to \left(\frac{\pi}{2}\right)^+$:
$\text{RHL} = \lim_{x \to (\pi/2)^+} (\sin x + n) = \sin\left(\frac{\pi}{2}\right) + n = 1 + n$.
For the function to be continuous, $\text{LHL} = \text{RHL}$:
$m\left(\frac{\pi}{2}\right) + 1 = 1 + n$
Subtracting 1 from both sides gives:
$m\frac{\pi}{2} = n$
This matches option (D).
Self-correction/Note regarding $m, n \in \mathbb{Z}$: The condition that $m, n$ are integers would strictly imply $m=0, n=0$ because $\pi$ is irrational. If $m \neq 0$, then $\pi = \frac{2n}{m}$, which would make $\pi$ a rational number. However, the question simply asks for the derived relationship, which is $n = \frac{m\pi}{2}$. Even if $m=0, n=0$, this relation holds true ($0 = 0 \cdot \pi/2$). Option D is the generalized relation that must be satisfied.
Step 4: Final Answer:
The correct relation is $n = \frac{m\pi}{2}$.