To solve the problem, we need to evaluate the function \( f(x) \) defined as:
\[
f(x) = \sin x + \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} (\sin x + t \cos x) \, dt
\]
### Step 1: Break down the integral
We can separate the integral into two parts:
\[
f(x) = \sin x + \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sin x \, dt + \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} t \cos x \, dt
\]
### Step 2: Evaluate the first integral
The first integral is:
\[
\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sin x \, dt
\]
Since \( \sin x \) is constant with respect to \( t \), we can factor it out:
\[
\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sin x \, dt = \sin x \cdot \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} dt = \sin x \cdot \left( \frac{\pi}{2} - \left(-\frac{\pi}{2}\right) \right) = \sin x \cdot \pi
\]
### Step 3: Evaluate the second integral
Now, we evaluate the second integral:
\[
\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} t \cos x \, dt
\]
Since \( \cos x \) is constant with respect to \( t \), we can factor it out:
\[
\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} t \cos x \, dt = \cos x \cdot \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} t \, dt
\]
Now, we compute the integral \( \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} t \, dt \):
\[
\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} t \, dt = \left[ \frac{t^2}{2} \right]_{-\frac{\pi}{2}}^{\frac{\pi}{2}} = \frac{(\frac{\pi}{2})^2}{2} - \frac{(-\frac{\pi}{2})^2}{2} = \frac{\pi^2}{8} - \frac{\pi^2}{8} = 0
\]
Thus,
\[
\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} t \cos x \, dt = \cos x \cdot 0 = 0
\]
### Step 4: Combine the results
Now we can combine the results:
\[
f(x) = \sin x + \sin x \cdot \pi + 0 = \sin x + \pi \sin x = (1 + \pi) \sin x
\]
### Step 5: Find the maximum value of \( f(x) \)
The maximum value of \( \sin x \) is 1. Therefore, the maximum value of \( f(x) \) is:
\[
f(x)_{\text{max}} = (1 + \pi) \cdot 1 = 1 + \pi
\]
### Final Answer
Thus, the maximum value of \( f(x) \) is:
\[
\boxed{1 + \pi}
\]