# Tricky Definite Integral

1. Mar 9, 2013

### pierce15

1. The problem, the whole problem, and nothing but the problem

$$\int_0^\pi \frac{x \cdot sin(x)}{1+cos^2(x)} \, dx$$

2. Relevant equations

Integration by parts
trig substitution

3. The attempt at a solution

My first idea was to break up the integral by letting $u=x$ and $dv=sin(x)/(1+cos^2 x)$. I will omit the work, but it got me here:

$$\int_0^\pi \frac{x \cdot sin(x)}{1+cos^2(x)} \, dx = (x \cdot tan^{-1} (cos(x)) \big|_0^\pi - \int_0^\pi tan^{-1}(cos(x)) \, dx$$

I am fairly sure that I arrived at the second integral correctly. Is it integrateable, if that's a word?

Last edited: Mar 9, 2013
2. Mar 9, 2013

$works for inline. For the integral, it is a trick. Try substituting u=pi-x. Finding an indefinite integral is really pretty hopeless. Last edited: Mar 9, 2013 3. Mar 9, 2013 ### pierce15 $$- \int_0^\pi tan^{-1} cos(x) \, dx$$ $$u= \pi-x, du=- dx$$ $$\int_\pi^0 tan^{-1} cos(\pi-u) \, du$$ $$- \int_0^\pi tan^{-1}(cos(\pi)cos(u) + sin(\pi)sin(u)) \, du$$ $$- \int_0^\pi tan^{-1}(-cos(u)) \, du$$ $$\int_0^\pi tan^{-1}cos(u) \, du$$ Hmm... does that mean that since the top equation is equal to the bottom, and they are negatives, the integral must be 0? Last edited: Mar 9, 2013 4. Mar 9, 2013 ### Dick I meant you to use that substitution in the original integral. You should get the original integral back with a different sign plus something you can integrate. Equate it to the original integral. 5. Mar 9, 2013 ### pierce15 $$\int_0^\pi \frac{x \cdot sin(x)}{1+cos^2x} \, dx$$ $$u=\pi-x, du=-1$$ $$- \int_\pi^0 \frac{(\pi-u)(sin(\pi-u))}{1+cos^2(\pi-u)} \, du$$ $$\int_0^\pi \frac{(\pi-u)(-sin(u))}{1+ cos^2(\pi-u)} \, du$$ $$-\int_0^\pi \frac{sin(u)(\pi-u)}{1+ cos^2(\pi-u)} \, du$$ $$-\int_0^\pi \frac{sin(u)(\pi-u)}{1+ (-cos(u))^2} \, du$$ $$-\int_0^\pi \frac{sin(u)(\pi-u)}{1+ cos^2u} \, du$$ $$-\pi \int_0^\pi \frac{sin(u)}{1+ cos^2u} \, du + \int_0^\pi \frac{u \cdot sin(u)}{1+ cos^2u}$$ $$v=cos(u), dv=-sin(u) \, du$$ $$\pi \int_1^{-1} \frac{dv}{1+v^2} + \int_0^\pi \frac{u \cdot sin(u)}{1+ cos^2u}$$ Going back to the beginning: $$\int_0^\pi \frac{x \cdot sin(x)}{1+cos^2x} \, dx = -\pi \int_{-1}^1 \frac{dv}{1+v^2} + \int_0^\pi \frac{u \cdot sin(u)}{1+ cos^2u}$$ $$0=\int_{-1}^1 \frac{dv}{1+v^2}$$ Am I on the right track? Last edited: Mar 9, 2013 6. Mar 9, 2013 ### Dick First fix an error. sin(pi-u)=sin(u). Then break it into two integrals. 7. Mar 9, 2013 ### pierce15 $$\int_0^\pi \frac{x \cdot sin(x)}{1+cos^2x} \, dx$$ $$u=\pi-x, du=-1$$ $$- \int_\pi^0 \frac{(\pi-u)(sin(\pi-u))}{1+cos^2(\pi-u)} \, du$$ $$\int_0^\pi \frac{(\pi-u)(sin(u))}{1+ cos^2(\pi-u)} \, du$$ $$\int_0^\pi \frac{sin(u)(\pi-u)}{1+ cos^2(\pi-u)} \, du$$ $$\int_0^\pi \frac{sin(u)(\pi-u)}{1+ (-cos(u))^2} \, du$$ $$\int_0^\pi \frac{sin(u)(\pi-u)}{1+ cos^2u} \, du$$ $$\pi \int_0^\pi \frac{sin(u)}{1+ cos^2u} \, du - \int_0^\pi \frac{u \cdot sin(u)}{1+ cos^2u}$$ $$v=cos(u), dv=-sin(u) \, du$$ $$\pi \int_1^{-1} \frac{dv}{1+v^2} - \int_0^\pi \frac{u \cdot sin(u)}{1+ cos^2u} \, du$$ Is the following OK: $$I = \int_0^\pi \frac{x \cdot sin(x)}{1+cos^2x} \, dx = \pi \int_{-1}^1 \frac{dv}{1+v^2} - \int_0^\pi \frac{u \cdot sin(u)}{1+ cos^2u}$$ $$2I = \pi \int_{-1}^1 \frac{dv}{1+v^2}$$ If so, how can I evaluate this integral? 8. Mar 9, 2013 ### Dick You know, having to constantly go back and check whether you have reedited a past post really sucks. Use preview to see whether you have what you want, then just LEAVE IT. If you change your mind, just post the correction. Don't go back and change the past. And yes, your result is fine. 9. Mar 9, 2013 ### pierce15 Sorry 10. Mar 9, 2013 ### Dick S'ok. Just advice for the future. But you got the right answer. 11. Mar 9, 2013 ### pierce15 So the answer is just 0? 12. Mar 9, 2013 ### Dick It's an arctan, isn't it? Why do you think it's zero? 13. Mar 9, 2013 ### Dick Now I forgot to quote the integral. Doesn't look like zero to me. 14. Mar 9, 2013 ### pierce15 Oh, right. I'm pretty tired right now. Just did out the trig substitution and verified that it's 0. How did you know to make the substitution u=pi-x? 15. Mar 9, 2013 ### pierce15 [itex] 1/(1+v^2)$ is also an even function which is probably enough to show that the answer is 0, considering that the upper limit is equal to the lower limit

16. Mar 9, 2013

### Dick

Tired, ok. But it's NOT zero. Check it in the morning if that works better. I guessed to do the substitution because I've seen problems like this before. Just experience.

17. Mar 9, 2013

### Dick

Wrong. Get some sleep if you need to.

18. Mar 9, 2013

### pierce15

$$\int_{-1}^1 \frac{dv}{v^2+1}$$
$$v= tan\theta, dv=sec^2\theta d\theta$$
$$\int_{-\pi/4}^{\pi/4} \frac{sec^2 \theta}{sec^2 \theta} d\theta$$
$$\int_{-\pi/4}^{\pi/4} \theta d\theta$$
$$\frac{\theta^2}{2} \big|_{-\pi/4}^{\pi/4}$$
$$(\pi/4)^2/2 - (-\pi/4)^2/2$$

Alright, I see that I'm wrong by looking at the graph. What's the problem here?

19. Mar 9, 2013

### Dick

Now you are making me sleepy. sec(θ)^2/sec(θ)^2 isn't θ. It's 1.

20. Mar 9, 2013

### pierce15

$$\theta \big|_{-\pi/4}^{\pi/4} = \pi/2$$
$$2I= \pi/2$$
$$I = \pi/4$$

Were there any arithmetic errors in there? haha