Concept: This problem involves identifying a function from a given integral identity. The key idea is that if:
\[
\int f(x)\cos x \, dx = \frac{1}{2}[f(x)]^2 + c
\]
then differentiating both sides with respect to \(x\) helps us retrieve a differential equation involving \(f(x)\).
Step 1: Differentiate both sides with respect to \(x\).
Left-hand side becomes:
\[
\frac{d}{dx}\left(\int f(x)\cos x \, dx\right) = f(x)\cos x
\]
Right-hand side becomes:
\[
\frac{d}{dx}\left(\frac{1}{2}[f(x)]^2 + c\right) = f(x)\cdot f'(x)
\]
Step 2: Equate both derivatives:
\[
f(x)\cos x = f(x)f'(x)
\]
Step 3: Simplify equation.
Assuming \(f(x) \neq 0\), divide both sides by \(f(x)\):
\[
f'(x) = \cos x
\]
Step 4: Integrate both sides to find \(f(x)\):
\[
f(x) = \int \cos x \, dx = \sin x + C
\]
Step 5: Substitute into original relation to determine constant consistency.
Plugging \(f(x) = \sin x + C\) into RHS:
\[
\frac{1}{2}(\sin x + C)^2 + c
\]
Differentiating confirms the identity holds for constant \(C=0\).
Thus:
\[
f(x) = \sin x
\]
Step 6: Evaluate at \(x = \frac{\pi}{2}\):
\[
f\left(\frac{\pi}{2}\right) = \sin\left(\frac{\pi}{2}\right) = 1
\]
Step 7: Hence:
\[
f\left(\frac{\pi}{2}\right) = c + 1
\]