Integration of cos(px)

1. Sep 16, 2008

winston2020

1. The problem statement, all variables and given/known data
Solve the following Integral:
$$\int_{1}^2cos(px)dx$$
where p is a constant

2. Relevant equations

3. The attempt at a solution
I'm totally lost here...

2. Sep 16, 2008

PowerIso

This isn't to bad. So, let u = px. du = pdx. So can you take it from there?

3. Sep 16, 2008

winston2020

Not really... what is du = pdx? du is the same as $$\frac{d}{dx}u$$ right? But why is that useful? And what is pdx?

4. Sep 16, 2008

BlackJack

It's just a subsitution.

If du = p*dx then dx = du / p. Now integrate normally and at the end re-substitute.

5. Sep 16, 2008

snipez90

Substitution is important and knowing how to u-sub is the key to many integrals. But sometimes knowing that integration and differentiation are inverse operations allows you to guess the antiderivative.

What is the antiderivative of cos(x)? Where should the p be included? How do constants work when differentiating/integrating? You'll see that these questions aren't very hard to answer and it's more about thinking than just a routine substitution (though u-sub can get pretty tricky sometimes).

6. Sep 17, 2008

winston2020

Ok, should it go something like this?:

$$\int_{1}^2cos(px)dx$$

Let $$u = px$$

Therefore, $$du = pdx$$

And, $$dx = \frac{du}{p}$$

So,

$$\int_{1}^2cos(px)dx = \int_{1}^2cos(u)\frac{du}{p}$$
$$= \frac{sin(u)}{p} + c$$

Is that correct?

7. Sep 17, 2008

winston2020

anyone?

8. Sep 17, 2008

physicsnoob93

It would be more convenient to pull the 1/p out of the integral. Your solution seems correct.

9. Sep 17, 2008

Mute

You've evaluated the indefinite integral, but you still need to evaluate it at the limits you're given before the problem is complete.

i.e.,

$$\int_a^b f(x)~dx = F(b) - F(a)$$

where F(x) is the antiderivative of f(x).

10. Sep 17, 2008

olgranpappy

Almost, but

$$\int_{1}^2cos(px)dx \neq \int_{1}^2cos(u)\frac{du}{p}$$

...the limits are wrong on the RHS.

...in addition, you can easily see that your final equal sign is wrong by considering what happens if p=0. The answer should be 1... but your wrong answer is infinite at that value of p.

11. Sep 18, 2008

HallsofIvy

Staff Emeritus
It is true that $\int cos(px)dx= (1/p)sin(px)+ C$. In order to do the definite integral, evaluating at the limits of integration, you can either write
$$\int_1^2 cos(px)dx= \left \frac{1}{p}sin(px)+ C\left|_1^2$$
and evaluate at x= 1 and 2 or you can make the substitution u= px so that when x= 1, u= p and when x= 2, u= 2p and write
$$\int_1^2 cos(px)dx= \frac{1}{p}\int_p^{2p} cos(u)du=\left \frac{1}{p}sin(u)\right|_p^{2p}$$

In more complicated problems you might have to make several substitutions and then it is better to change the limits of integration as you go (second method).