Answer:
![x+(-1)/(3) \ln|x|+(-8)/(3)\ln|x+3|+C](https://img.qammunity.org/2020/formulas/mathematics/college/16k7yx118f596rnqjo0tbawr4tieakvef0.png)
Explanation:
To use partial fractions, I'm going to first do long division because the degree of the top is more than or equal to that of the bottom.
After I have that the degree of the bottom is more than the degree of the top, I will factor my bottom to figure out what kinds of partial fractions I'm going to have.
Let's begin with the long division:
The bottom goes outside.
The top goes inside.
1
-----------------
x^2+3x| x^2 -1
-(x^2+3x)
-----------------------------
-3x -1
We can not going any further since the divisor is more in degree than the left over part.
So we have so for that the integrand given equals:
![(x^2-1)/(x^2+3x)=1+(-3x-1)/(x^2+3x)](https://img.qammunity.org/2020/formulas/mathematics/college/s0ft2b16cdsanpmbpisryy15xql9jf85l7.png)
The 1 will of course not need partial fraction.
So we know our answer is x + something + C
Since the derivative of (x+c)=(1+0)=1.
Let's focus now on:
![(-3x-1)/(x^2+3x)](https://img.qammunity.org/2020/formulas/mathematics/college/w2unje73i2pvvy791ipqvokmmu1jca5l77.png)
The bottom is not too bad too factor because it is binomial quadratic containing terms with a common factor of x:
![x^2+3x=x(x+3)](https://img.qammunity.org/2020/formulas/mathematics/college/yjj1zztkwut14y5ct9svsr4zcrdkkacuqa.png)
Since both factors our linear and there are two factors, then we will have two partial fractions where the numerators are both constants.
So we are looking to make this true:
![(-3x-1)/(x^2+3x)=(A)/(x)+(B)/(x+3)](https://img.qammunity.org/2020/formulas/mathematics/college/ygnb5xpkj5vpq6pf2siemlthku43yl52wy.png)
Some people like to combine the fractions on the left and then regroup the terms and then compare coefficients.
Some people also prefer a method called heaviside method.
So I'm actually going to do this last way and I will explain it as I got.
We are going to clear the fractions by multiplying both sides by
giving me:
![-3x-1=A(x+3)+Bx](https://img.qammunity.org/2020/formulas/mathematics/college/zd5s0uwxshdx6pf1ugsidebmk7x88d5lup.png)
I know x+3 will be 0 when x=-3 so entering in -3 for x gives:
![-3(-3)-1=A(-3+3)+B(-3)](https://img.qammunity.org/2020/formulas/mathematics/college/uurq4ubftc8gyd8x78nmggku02e950bgiq.png)
![9-1=A(0)-3B](https://img.qammunity.org/2020/formulas/mathematics/college/252rm4dmzcm12dk5bqmh305pqz32att5im.png)
![8=-3B](https://img.qammunity.org/2020/formulas/mathematics/college/958zawd1u2e1kbur3xipeh1bwokksv55ae.png)
Divide both sides by -3:
![(8)/(-3)=B](https://img.qammunity.org/2020/formulas/mathematics/college/1pm4isn8ak549v44sfqg4o3csuq9ilo8do.png)
/
Now let's find A. If I replace x with 0 then Bx becomes 0 giving me:
![-3(0)-1=A(0+3)+B(0)](https://img.qammunity.org/2020/formulas/mathematics/college/2ebougnf6448clxm6mxw64tkeqq7y7g5cd.png)
![-1=A(3)+0](https://img.qammunity.org/2020/formulas/mathematics/college/qbwgrazkq5a0y6ml752nvmcfkvseq26sqp.png)
![-1=3A](https://img.qammunity.org/2020/formulas/mathematics/college/9qnddv8rhr0myat0g1mm1b40ccy18euia8.png)
Divide both sides by 3:
![(1)/(-3)=A](https://img.qammunity.org/2020/formulas/mathematics/college/gnk9yrr6b0rnyfhmpf9ew0waqzit6vbbrf.png)
![(-1)/(3)=A](https://img.qammunity.org/2020/formulas/mathematics/college/g2aybce5ub5c4dx0hynz6een498kjy9dmv.png)
Okay let me also who you other method of just comparing coefficients.
![-3x-1=A(x+3)+Bx](https://img.qammunity.org/2020/formulas/mathematics/college/zd5s0uwxshdx6pf1ugsidebmk7x88d5lup.png)
Distribute on the right:
![-3x-1=Ax+3A+Bx](https://img.qammunity.org/2020/formulas/mathematics/college/5xd2eme9n8pk7hk60qu97kjyuk7u441ct1.png)
Regroup terms on right so like terms are together:
![-3x-1=(A+B)x+3A](https://img.qammunity.org/2020/formulas/mathematics/college/ke530k3bb5rz45f56shij2sjgapqwgkcfk.png)
Now if this is to be true then we need:
-3=A+B and -1=3A
The second equation can be solved by dividing both sides by 3 giving us:
-3=A+B and -1/3=A
Now we are going to plug that second equation into the first:
-3=A+B with A=-1/3
-3=(-1/3)+B
Add 1/3 on both sides:
-3+(-1/3)=B
-8/3=B
So either way you should get the same A and B if no mistake is made of course.
So this is the integral we are looking at now (I'm going to go ahead and include the 1 from earlier):
![\int (1+((-1)/(3))/(x)+((-8)/(3))/(x+3))dx](https://img.qammunity.org/2020/formulas/mathematics/college/helczq9up10su1jasgsbm3lo7ujqjoxrzs.png)
![x+(-1)/(3) \ln|x|+(-8)/(3)\ln|x+3|+C](https://img.qammunity.org/2020/formulas/mathematics/college/16k7yx118f596rnqjo0tbawr4tieakvef0.png)
Why I did choose natural log for both of those 2 terms' antiderivatives?
Because they are a constant over a linear expression. Luckily both of those linear expressions had a leading coefficient of 1.
Also recall the derivative of ln(x) is (x)'/x=1/x and
the derivative of ln(x+3) is (x+3)'/(x+3)=(1+0)/(x+3)=1/(x+3).
Let's check our answer:
To do that we need to differentiate what we have for the integral and see if we wind up with the integrand.
![(d)/(dx)(x+(-1)/(3) \ln|x|+(-8)/(3)\ln|x+3|+C)](https://img.qammunity.org/2020/formulas/mathematics/college/7g3oxsd6843in34lis4s08yux26btuie3h.png)
![1+(-1)/(3) (1)/(x)+(-8)/(3)(1)/(x+3)+0](https://img.qammunity.org/2020/formulas/mathematics/college/5hiqszm5wh7e2njle2bbqembt9rbewm6wv.png)
We are going to find a common denominator which would be the least common multiple of the denominators which is x(x+3):
![(x(x+3)+(-1)/(3)(x+3)+(-8)/(3)(x))/(x(x+3))](https://img.qammunity.org/2020/formulas/mathematics/college/yhts388wmyxzf0ha2m8j634c4inpxgm3l4.png)
Now distribute property:
![(x^2+3x+(-1)/(3)x-1+(-8)/(3)x)/(x^2+3x)](https://img.qammunity.org/2020/formulas/mathematics/college/6cq79ydc1jeph7rjyuotw1w31cvtsj8vqg.png)
Combine like terms:
![(x^2+3x+(-9)/(3)x-1)/(x^2+3x)](https://img.qammunity.org/2020/formulas/mathematics/college/8q1nuszwkdtlgpixn1weicou0404da93ik.png)
![(x^2+3x-3x-1)/(x^2+3x)](https://img.qammunity.org/2020/formulas/mathematics/college/cvqc57w27roygh33hjdghyso1x03j7vbsa.png)
![(x^2-1)/(x^2+3x)](https://img.qammunity.org/2020/formulas/mathematics/college/qm72a5gaocdb6bv037nu3bfjm2gv5knet2.png)
So that is the same integrand we started with so our answer has been confirmed.