# Antiderivative quicky

1. Feb 13, 2007

### Sympathy

1. The problem statement, all variables and given/known data
whats the integral of cos^2(x)

2. Relevant equations
?

3. The attempt at a solution

is it just sin^3(x)/3?

2. Feb 13, 2007

### cepheid

Staff Emeritus
No. And you know that that is the wrong answer because:

$$\frac{d}{dx}\left(\frac{\sin^3(x)}{3}\right) = \sin^2(x)\frac{d}{dx}(\sin x) = \sin^2(x)\cos(x) \not= \cos^2(x)$$

Notice how I had a composition of functions and used the chain rule to differentiate. How do you deal with integrating something that has a composition of functions?

3. Feb 13, 2007

### mjsd

"easiest" way to integral this would probably be using the double angle formula

4. Feb 13, 2007

### Gib Z

Write out cos^2 x as (1-cos 2x)/2 is what mjsd meant.

5. Feb 14, 2007

### emilgouliev

integrtion by parts:

6. Feb 15, 2007

### Gib Z

That seems abit longer and harder than msjds method.
His way easily goes to this:
$$\frac{1}{2} \int 1 dx + \int \cos 2x dx = \frac{1}{2} (x + \int cos 2x dx)$$

u=2x du/dx = 2
$$\frac{1}{2}(x+\frac{1}{2}\int cos u du)= \frac{1}{2} ( x+\frac{1}{2}\sin u)$$

We're done, pretty fast too :)
$$\int \cos^2 x dx = \frac{x}{2} + \frac{\sin 2x}{4}$$

BTW emilgouliev, nice work, and Welcome to Physicsforums. :)