To solve the differential equation given in the problem, we start by rewriting it:
\(\int x f(x) \, dx + \frac{f(x)}{2} = 0\)
We can differentiate both sides with respect to \(x\) to eliminate the integration:
\(\frac{d}{dx}[\int x f(x) \, dx] + \frac{d}{dx}\left(\frac{f(x)}{2}\right) = 0\)
The derivative of an integral function with the same variable is simply the integrand. Therefore, we get:
\(x f(x) + \frac{1}{2} f'(x) = 0\)
To solve this first-order linear differential equation, we can rewrite it as:
\(f'(x) = -2x f(x)\)
This equation is separable, so we can solve it by separating variables:
\(\frac{df}{f} = -2x \, dx\)
Integrating both sides gives:
\(\int \frac{1}{f} \, df = \int -2x \, dx\)
Perform the integrals:
\(\ln|f| = -x^2 + C\)
Now, solve for \(f(x)\):
\(f(x) = e^{-x^2 + C}\)\)
The constant \(C\) can be written as \(e^C\), which is just another constant, say \(k\). Therefore, we have:
\(f(x) = ke^{-x^2}\)
Among the given options, this matches with \(e^{-x^2}\) when considering constant \(k\) as 1.
Thus, the correct answer is \(e^{-x^2}\).