# Trouble with integral

1. Jul 3, 2006

### suspenc3

Hi, Ive been having trouble with this one its probly easy, but I cant get started.

$$\int sinxcos(cosx)$$

I tried integrating by parts,

u=cos(cosx)
du=-sin(cosx)(-sinx)......is this even right?
dv=sinx
v=-cosx
but it looks as if doing that made it alot harder, can anyone point me in the right direction?thanks

2. Jul 3, 2006

### shmoe

Did you try a substitution?

3. Jul 3, 2006

### suspenc3

$$u=cosx$$
$$du=-sinx$$
$$-\int cosu du$$
$$=-sin u$$
$$=-sin(cosx)$$

I pray this is wrong because if it isnt i'm retarted

4. Jul 3, 2006

### shmoe

That's it. (plus a constant, +C)

5. Jul 3, 2006

### suspenc3

I have another question which isnt explained in the text, when trying to find out A B and C in a partial fraction integral, how do you do it, I read online somewhere about gaussian elimination, it wasnt well explained though, is this how, or is there another way, can you explain?

Thanks

6. Jul 3, 2006

### HallsofIvy

Staff Emeritus
Gaussian elimination???

I assume that by "A B and C in a partial fraction integral" you mean, for example, the A, B, C is
$$\frac{1}{(x-1)(x-2)(x-3)= \frac{A}{x-1}+ \frac{B}{x-2}+ \frac{C}{x-2}$$

Multiply the entire equation by the denominator (x-1)(x-2)(x-3) and you get
$$1= A(x-2)(x-3)+ B(x-1)(x-2)+ C(x-1)(x-2)$$

Now let x= 1, 2, 3 in succession and A, B, C fall out. If you denominators are (x-a)2 or x2+ 1 you might need to let x equal other numbers to get additional equations to solve.

7. Jul 3, 2006

### shmoe

There's more than one way to approach it. An example:

$$\frac{1}{x^2-1}=\frac{1}{(x-1)(x+1)}$$

The denominator is distinct linear factors, so we know we will have:

$$\frac{1}{x^2-1}=\frac{A}{x-1}+\frac{B}{x+1}$$

for some A and B. this becomes:

$$\frac{1}{x^2-1}=\frac{A(x+1)}{x^2-1}+\frac{B(x-1)}{x^2-1}=\frac{Ax+A+Bx-B}{x^2-1}=\frac{(A+B)x+(A-B)}{x^2-1}$$

Next equate the numerators:

$$0x+1=(A+B)x+(A-B)$$

the 'placeholder' 0x is so you see the linear term is zero on the left.

Equating coefficients you now have a system of 2 equations and 2 variables:

0=A+B
1=A-B

Gaussian elimination is a general method for solving linear systems like this, but you can use whatever you like. Here, A=-B from the first equation, then the second becomes 1=2*A, so A=1/2 and B=-1/2.

Rather than collect terms when you combined the fractions on the right hand side above, you could equate the numerators as:

$$1=A(x+1)+B(x-1)$$

and sub in some convenient values for x. x=1 gives 1=A*(2)+B*(0) so A=1/2. x=-1 gives 1=A*(0)+B*(-2), so B=-1/2.

8. Jul 3, 2006

### suspenc3

i understand what you are saying..heres what im trying to figure out...

A+B=1
A-B+C=0
4A-6B-3C=0
?

9. Jul 3, 2006

### shmoe

Well you can use the first equation to write B in terms of A, giving B=1-A.

Substitute this value of B into the 2nd and 3rd equations and you now have 2 equations with 2 unknowns (A and C). Solve either equation for either A or C and substitute into the remaining equation and you'll have one of the variables. Can you see how to do this and where to go from here?

10. Jul 3, 2006

### suspenc3

yea i think im getting it...Il see if i can get an answer!

11. Jul 3, 2006

### suspenc3

ok, that wasnt too tough, i think i got it

12. Jul 3, 2006

### suspenc3

one final question..if i have $$\frac{x^3}{(x+3)^3}$$..would it be this...$$\frac{A}{x+3} + \frac{B}{(x+3)^2} + \frac {C}{(x+3)^3}$$..or would i have A B C and D...$$\frac{A}{1} + \frac{B}{x+3}$$and so on?

13. Jul 3, 2006

### 0rthodontist

In that case you have to do polynomial division first to get the numerator in lower terms than the denominator, and then it's the 3 term decomposition.

14. Jul 3, 2006

### suspenc3

oooooone more..heres my question..$$\int ln(x^2-1)dx$$..i let..
u=ln(x^2+1)
du=2x
dv=dx
v=x
so....i kept going and got $$ln(x^2-1)x - \int \frac{2x^2}{x^2-1}dx$$..would this partial fraction be A/x+1 +(B/x-1)?if so im confused because i get A+B=0 and A-B=0

Last edited: Jul 3, 2006
15. Jul 3, 2006

### d_leet

If u is ln(x^2+1) then du is definitely not 2x. What is the derivative of the natural log?

16. Jul 3, 2006

### suspenc3

yeah my bad..i meant to say $$2x \frac{1}{x^2-1}$$

17. Jul 3, 2006

### d_leet

Before you try decomposing into partial fractions you should divide 2x2 by x2-1 and that should give you something pluse a linear term over x2-1.

18. Jul 3, 2006

### suspenc3

good thinkin, I thinkI got it, THanks leet

19. Jul 3, 2006