TITLE: Looking for some help with integration of $y=(1+x^2) \cos x$
QUESTION [0 upvotes]: Here is the curve $y=(1+x^2) \cos x$
I have worked out an approximation for the area under this curve $R$, using the trapezium rule, however I must integrate this curve in order to find the exact area of $R$.
not too sure how to go about this, would appreciate any help!

REPLY [0 votes]: \begin{gather*}
I=\int \left( 1+x^{2}\right)\cos xdx\\
\\
We\ have,\ for\ integration\ by\ parts,\\
\int u\cdot vdx=u\int vdx-\int \frac{du}{dx}\left(\int vdx\right) dx\\
\\
Using\ integration\ by\ parts,\ and\ taking\ \\
u=1+x^{2} \ as\ the\ first\ part\ and\ v=\cos x\ as\ the\ second,\\
I=\left( 1+x^{2}\right)\sin x-\int 2x\sin xdx\\
\\
Again\ ,I_{2} =\int 2x\sin xdx\\
Take\ u=2x\ as\ the\ first\ part,\ and\ v=\sin x\ as\ the\ second,\\
I_{2} =-2x\cos x+\int 2\cos xdx=-2x\cos x+2\sin x\\
I=\left( 1+x^{2}\right)\sin x-I_{2} =\left( 1+x^{2}\right)\sin x-( -2x\cos x+2\sin x)\\
=\left( 1+x^{2}\right)\sin x+2x\cos x-2\sin x\\
=\left( x^{2} -1\right)\sin x+2x\cos x\\
\\
\end{gather*}
Hope this answers your query!
Edit: If I interpret R correctly to be the real number line, then the resulting definite integral will turn out to be zero, simply because the integrand is even, and for even functions,
\begin{equation*}
\int ^{a}_{-a} f( x) dx=0
\end{equation*}
{"set_name": "stack_exchange", "score": 0, "question_id": 4044258}