# Apostol's Integration by substitution problem

1. Dec 26, 2011

### AndersCarlos

1. The problem statement, all variables and given/known data

a) Show that:

$$\int_{0}^{\pi} xf(sin (x))dx = \frac{\pi}{2}\int_{0}^{\pi} f(sin (x))dx$$
[Hint: u = π - x]
b) Use part a) to deduce the formula:

$$\int_{0}^{\pi} \frac{xsin(x)}{1 + cos^2 (x)} dx = \pi\int_{0}^{1} \frac{dx}{1 + x^2}$$

2. Relevant equations

$$\int_{a}^{b} f(x)dx = \frac{1}{k}\int_{ka}^{kb} f(\frac{x}{k})$$
for any constant 'k'.
3. The attempt at a solution
a)
Tried to imagine where I could apply the hint and used the property: -sin(x) = sin(π-x) in the process of substitution, but no progress.
b)
I used the only relevant equation to convert the interval [0,1] to [0, π] in the right side, considering k = π, however I was not able to progress much after this.

2. Dec 26, 2011

### Curious3141

For a), start by making the suggested substitution. The big hint is that a definite integral between the same upper and lower bounds would be exactly the same if the integrand is of the same form, *even* if the function is of another variable.

In other words, $\int_a^b f(x)dx = \int_a^b f(y)dy$.

Also remember that taking the negative of a definite integral is the same as reversing the bounds.

You don't actually have to do any integration here. You just end up with a simple equation that you can solve to show that result.

3. Dec 26, 2011

### Curious3141

(never mind, I need to work some more on part b).

4. Dec 26, 2011

### AndersCarlos

Curious3141:

After some seconds, I could get the right answer for part a, thank you very much.
About part b, well, I just double-checked both Spanish and English versions of Apostol. Both show the question as I've written.

5. Dec 26, 2011

### Curious3141

(Post edited - ignore this, I've found the solution. Please see below).

Last edited: Dec 26, 2011
6. Dec 26, 2011

### Curious3141

Sorry, the problem is correctly stated. It was my error (caused by a lapse in thinking, the result of doing this at 1:30 in the morning local time, haha).

Fairly simple, really. Set $f(\sin x) = \frac{\sin x}{1 + \cos^2 x}$.

Then use the result in part a). To evaluate the integral $\int_0^{\pi}f(\sin x)dx$, first break up the integral into two integrals, the first bounded from 0 to pi/2, the second from pi/2 to pi. Then make the substitution $u = \cos x$ into each integral. Be careful with the bounds and remember that taking the negative reverses the bounds. Don't forget to multiply by pi/2 at the end (as per the result from part a). Everything should fall into place.

My mistake was that, for some reason (brain failure at half past one AM), I kept harping on the wrong substitution (for sine). It's trivial once you realise it has to be a cosine substitution.

7. Dec 26, 2011

### Curious3141

I hope you don't mind me adding posts rather than editing my previous one, because I can't be sure you've already read the last post.

I wanted to add that another critical step is to recognise that $\frac{1}{1+u^2}$ is an even function.

For an even function f(x), $\int_{-b}^{-a} f(x)dx = \int_a^b f(x)dx$.

Can you see why? Can you apply it here?

8. Dec 26, 2011

### AndersCarlos

I was just finishing the proof that 1/(1+x^2) is even. I got the following result:
$$\frac{\pi}{2}(\int_{0}^{1} \frac{du}{1+u^2} + \int_{0}^{-1} \frac{du}{1+u^2})$$
Then I used the property of even functions so this would become:
$$\frac{\pi}{2}(2\int_{0}^{1} \frac{du}{1+u^2})$$
Then, according to that property: ∫f(x)dx = ∫f(y)dy, I just changed it to x, which completes the proof. Thank you very much again for your help. This problem has been bothering me for days.

9. Dec 26, 2011

### Curious3141

EDIT: noticed an error. Your second integral should go from lower bound of -1 to upper bound of zero. That's equivalent from going from a lower bound of 0 to an upper bound of 1 for an even function.

Quick proof. Consider an even function f(x). f(x) = f(-x). Make the substitution x = -y.

Then $\int_a^b f(x)dx = \int_{-a}^{-b} f(-y)(-dy) = -\int_{-a}^{-b} f(-y)dy = \int_{-b}^{-a} f(-y)dy = \int_{-b}^{-a} f(y)dy = \int_{-b}^{-a} f(x)dx$.

Last edited: Dec 26, 2011
10. Dec 26, 2011

### AndersCarlos

Curious3141:
Just a little question (A edit would be better, but I don't know if you would see it). If I have another problem, should I create a new thread or can I post it in this one?

11. Dec 26, 2011

### Curious3141

There's a small error in your proof. Please see my post above.

I suggest you create a new thread for a new problem. But I'm afraid I have to turn in now, it's past 2am. If I'm able to, I can help you tomorrow after work (unless someone has beaten me to it). Good luck.

12. Dec 26, 2011

### AndersCarlos

Curious3141:

Ah, I just saw what went wrong. When I was solving it and went to the next line, I forgot to write the minus sign inside the integral, that's why I got the wrong intervals. Thank you again.