Integral \(\int e^x\left(1+x^2\right)dx=\)
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → \(\left(x^2-2x+3\right)e^x+c\) (c is a constant)
By the standard result
\(\int e^x\left[f(x) + f'(x)\right]dx = e^x f(x) + c\)
Here \(1 + x^2\) can be written in the form \(f(x) + f'(x)\) with a quadratic f. Taking \(f(x) = x^2 - 2x + 3\):
\(f'(x) = 2x - 2\)
\(f(x) + f'(x) = x^2 - 2x + 3 + 2x - 2 = x^2 + 1\)
So
\(\int e^x\left(1+x^2\right)dx = \left(x^2 - 2x + 3\right)e^x + c\)
The same result comes from integration by parts: \(\int x^2e^x\,dx = e^x\left(x^2 - 2x + 2\right)\) and \(\int e^x\,dx = e^x\), which add to \(e^x\left(x^2 - 2x + 3\right)\).