So I have the following integration: ∫(x -2)(cosx)dx between the intervals (-a,a).
we know that, The integral of a even function over the range (-a,a) can be rewritten as twice of the intergral ranging from (0,a).
1.I let u be the (x-2) and cosxt as v . and applied the integration byparts and proceed (i.e) considering (x-2) as a even function as a whole and proceed. 2. I have to split the polynomial as ∫ (x * cosx)dx - ∫(2* cosx) dx and the first the first term would be odd hence the integral would be zero and the second would be even so take the integral twice of it ranging from (0 to a).
Can I take the u function as (x-2) , as it would not yeild 2 even fuction one wold be even the other a odd function , what I am proceeding is right? which method to follow .
Thanks in advance.
You cannot reason based on even and odd function identities because $u(x) = x - 2$ is neither even nor odd, and you are integrating the product of two functions. Let us use integration by parts with the tabular method.
Our "derivating" side runs $$x - 2$$ $$1$$ $$0.$$
Our "integrating" side runs $$\cos(x)$$ $$\sin(x)$$ $$-\cos(x).$$
The antiderivative is $$(x - 2)\sin(x) + \cos(x).$$
Evaluating, we have $$\int_{-a}^{a} (x - 2)\cos(x) dx$$ $$= \left[(x - 2)\sin(x) + \cos(x)\right]_{-a}^{a}$$ $$= [((a - 2)\sin(a) + \cos(a)) - ((-a - 2)\sin(-a) + \cos(-a))].$$
Simplifying, and now using even/odd identities, our final answer is $$\boxed{-4\sin(a)}.$$
Hope this was helpful.