# Second method of solving this integral needed

1. Jun 27, 2013

### flyinjoe

1. The problem statement, all variables and given/known data
Evaluate the indefinite integral using two separate cases:
∫xcos(bx) dx

2. Relevant equations
Integration by parts:
∫f(x)g'(x) dx = f(x)g(x) - ∫f'(x)g(x)

3. The attempt at a solution

I solved the problem using integration by parts and u-substitution and got the answer:
(cos(bx) + bx(sin(bx))) / b^2 + C

But my professor says we should discuss the problem in two separate ways. What might be the other method of solving this problem?

Thank you!

2. Jun 27, 2013

### pasmith

No, he says there are two cases to consider. Does your answer work for the case b = 0?

3. Jun 27, 2013

### flyinjoe

My answer definitely does not work when b = 0. Wonderful!

Now, should I re-integrate with b = 0, and get 1/2 x^2 + C, or re-define the domain as b≠0 ?

Sorry if these are silly questions,
Thank you!

4. Jun 27, 2013

### haruspex

Yes.

5. Jun 28, 2013

### Mute

Note also that you write the indefinite integral as

$$\int dx~x\cos(bx) = \frac{bx\sin(bx) + \cos(bx) - 1}{b^2} + C'.$$
You can do because the factor I introduced, $-1/b^2$, is just a constant which could be re-absorbed into C'.

If you now take the limit as $b \rightarrow 0$, you will find that your answer reduces to $x^2/2 + C'$.

(You don't need to split the factor of $-1/b^2$ off from the constant $C = C'-1/b^2$ from the original post, but if you don't you will have to throw away a "constant infinite factor" when taking the $b \rightarrow 0$ limit, and that can feel like you're being kind of shady. =P)