Let's simplify the quotient
(x^2+x+1)/(1-x^2)=(x^2+x+1)/(-x^2+1)=(-x^2-x-1)/(x^2-1)x2+x+11−x2=x2+x+1−x2+1=−x2−x−1x2−1
=-1+(-x-2)/(x^2-1)=-1-(x+2)/(x^2-1)=−1+−x−2x2−1=−1−x+2x2−1
Now, we perform the decomposition into partial fractions
(x+2)/(x^2-1)=A/(x+1)+B/(x-1)=(A(x-1)+B(x+1))/((x-1)(x+1))x+2x2−1=Ax+1+Bx−1=A(x−1)+B(x+1)(x−1)(x+1)
The numerators are the same. we compare the numerators
x+2=A(x-1)+B(x+1))x+2=A(x−1)+B(x+1))
Let x=1x=1, =>⇒, 3=2B3=2B, =>⇒, B=3/2B=32
Let x=-1x=−1, =>⇒, 1=-2A1=−2A, =>⇒, A=-1/2A=−12
Therefore,
(x^2+x+1)/(1-x^2)=-1+(1/2)/(x+1)-(3/2)/(x-1)x2+x+11−x2=−1+12x+1−32x−1
int((x^2+x+1)dx)/(1-x^2)=int-1dx+int(1/2dx)/(x+1)-int(3/2dx)/(x-1)∫(x2+x+1)dx1−x2=∫−1dx+∫12dxx+1−∫32dxx−1
=-x+1/2ln(|x+1|)-3/2ln(|x-1|)+C=−x+12ln(|x+1|)−32ln(|x−1|)+C