# Homework Help: Trig substitution integral.

1. Jul 12, 2007

### Zeth

$$\int_{-2} ^2 \frac{dx}{4+x^2}$$

I use the trig substitution and get everything done but for some reason I can't get the answer, here's all my working:

$$x = 2 \tan\theta$$

$$dx = 2 \sec^2\theta$$

$$4+x^2=4(1+\tan\theta)=4\sec^2\theta$$

$$\int \frac{2\sec^2\theta d\theta}{4\sec^2\theta}$$

$$\int \frac{1}{2\sec^2\theta}d\theta$$

$$\int 2\cos^2\theta d\theta$$

$$\int (1+\cos2\theta)$$

$$\theta + \frac{\sin2\theta}{2}$$

$$[\arctan\frac{x}{2} + \frac{\sin 2 \arctan \frac{x}{2}}{2}]_{-2} ^2$$

which is nothing close to what am I meant to get $$\frac{\pi}{4} 2. Jul 12, 2007 ### Kurdt Staff Emeritus 3. Jul 12, 2007 ### Zeth So is my working is otherwise correct? I'm going out to an open seminar so I don't have time to learn and try what you suggested right now. 4. Jul 12, 2007 ### Kurdt Staff Emeritus Seems fine otherwise. In these questions the problems usually come at the end when you have to employ loads of trig identities to get it in the form of your trig substitution. It'll come with practise. Oh just spotted a mistake with a constant: [tex]\int \frac{1}{2\sec^2\theta}d\theta$$

$$\frac{1}{2}\int \cos^2\theta d\theta$$

Last edited: Jul 12, 2007
5. Jul 13, 2007

### TheoMcCloskey

Wait a minute guys ... look at Zeth's fifth step. His error is in the next step

6. Jul 13, 2007

### HallsofIvy

Right here- you've canceled wrong! It's much simpler than you think.

7. Jul 13, 2007

### Kurdt

Staff Emeritus
Jeez how did I not spot that. I'm blaming it on the fact that I was answering at 4 AM

8. Jul 13, 2007

### CompuChip

And after a little training, you recognize that
$$\frac{d}{dx} \arctan x = \frac{1}{1 + x^2}$$
and you would solve it like this:

Rewrite
$$\int_{-2}^2 \frac{dx}{4 + x^2} = \frac{1}{4} \int_{-2}^2 \frac{dx}{1 + (x/2)^2}.$$
Now differentiating $arctan(x / 2)$ gives the integrand with an extra factor 1/2 for which we need to compensate. So the integral is
$$\frac{1}{4} \left( 2 \arctan \frac{x}{2} \right)_{-2}^2 = \frac{2}{4} \left( \frac{\pi}{4} - \frac{-\pi}{4} \right) = \frac{1}{2} \left( 2 \frac{\pi}{4} \right) = \frac{\pi}{4},$$
which is easier than substitution, but requires you to spot the arctan (hence my first remark).