Step 1: Split the integral based on absolute value.
Since we have the absolute value function, we need to split the integral into two parts: one for negative values of \(x\) and one for positive values. \[ \int_{-\frac{\pi}{6}}^{\frac{\pi}{3}} (\sin|x| + \cos|x|)\, dx \] We can split the integral as: \[ \int_{-\frac{\pi}{6}}^{0} (\sin(-x) + \cos(-x))\, dx + \int_{0}^{\frac{\pi}{3}} (\sin x + \cos x)\, dx \]
Step 2: Simplify the expressions.
We know that \(\sin(-x) = -\sin x\) and \(\cos(-x) = \cos x\), so the first integral becomes: \[ \int_{-\frac{\pi}{6}}^{0} (-\sin x + \cos x)\, dx \] Hence, the entire integral is: \[ \int_{-\frac{\pi}{6}}^{0} (-\sin x + \cos x)\, dx + \int_{0}^{\frac{\pi}{3}} (\sin x + \cos x)\, dx \]
Step 3: Solve the integrals.
For the first integral: \[ \int (-\sin x + \cos x)\, dx = \cos x + \sin x \] Evaluating from \(-\frac{\pi}{6}\) to 0: \[ \left[ \cos x + \sin x \right]_{-\frac{\pi}{6}}^{0} = \left( \cos(0) + \sin(0) \right) - \left( \cos\left(-\frac{\pi}{6}\right) + \sin\left(-\frac{\pi}{6}\right) \right) \] \[ = 1 - \left( \frac{\sqrt{3}}{2} - \frac{1}{2} \right) = 1 - \frac{\sqrt{3}}{2} + \frac{1}{2} \] \[ = \frac{3}{2} - \frac{\sqrt{3}}{2} \] For the second integral: \[ \int (\sin x + \cos x)\, dx = -\cos x + \sin x \] Evaluating from 0 to \(\frac{\pi}{3}\): \[ \left[ -\cos x + \sin x \right]_{0}^{\frac{\pi}{3}} = \left( -\cos\left(\frac{\pi}{3}\right) + \sin\left(\frac{\pi}{3}\right) \right) - \left( -\cos(0) + \sin(0) \right) \] \[ = \left( -\frac{1}{2} + \frac{\sqrt{3}}{2} \right) - (-1) = -\frac{1}{2} + \frac{\sqrt{3}}{2} + 1 \] \[ = \frac{1}{2} + \frac{\sqrt{3}}{2} \]
Step 4: Combine the results.
Adding the results of both integrals: \[ \left( \frac{3}{2} - \frac{\sqrt{3}}{2} \right) + \left( \frac{1}{2} + \frac{\sqrt{3}}{2} \right) \] \[ = \frac{3}{2} + \frac{1}{2} = 2 \]
Final Answer:
\[ \boxed{2} \]