Question:medium

If the function given by
$f(x) = -2 \sin x$ for $-\pi \le x < -\frac{\pi}{2}$
$f(x) = a \sin x + b$ for $-\frac{\pi}{2} < x < \frac{\pi}{2}$
$f(x) = \cos x$ for $\frac{\pi}{2} \le x \le \pi$
is continuous in $[-\pi, \pi]$, then the value of $(3a + 2b)^3$ is

Show Hint

Whenever a problem states a piecewise function is continuous and gives a relation like $a + b = 0$, you instantly know $a$ and $b$ are opposites! Substituting $a = -b$ early into your first equation turns it into a simple one-variable solution in a flash.
Updated On: Jun 12, 2026
  • $1$
  • $8$
  • $-1$
  • $-8$
Show Solution

The Correct Option is C

Solution and Explanation

Step 1: Use the meaning of continuity at the joins.
The function is built in pieces: $-2\sin x$, then $a\sin x + b$, then $\cos x$. For it to be continuous everywhere, the pieces must agree at $x = -\frac{\pi}{2}$ and $x = \frac{\pi}{2}$.
Step 2: Match the pieces at $x = -\dfrac{\pi}{2}$.
Left piece value: $-2\sin\left(-\frac{\pi}{2}\right) = -2(-1) = 2$. Middle piece value: $a\sin\left(-\frac{\pi}{2}\right) + b = -a + b$. Equality gives $-a + b = 2$.
Step 3: Match the pieces at $x = \dfrac{\pi}{2}$.
Middle piece value: $a\sin\frac{\pi}{2} + b = a + b$. Right piece value: $\cos\frac{\pi}{2} = 0$. Equality gives $a + b = 0$.
Step 4: Solve the two equations.
Adding $-a + b = 2$ and $a + b = 0$ gives $2b = 2$, so $b = 1$. Then $a = -b = -1$.
Step 5: Form the required expression.
We need $(3a + 2b)^3$. Substitute $a = -1$, $b = 1$: $3(-1) + 2(1) = -3 + 2 = -1$.
Step 6: Cube the result.
$(-1)^3 = -1$.
\[ \boxed{(3a+2b)^3 = -1} \]
Was this answer helpful?
0