# Integration Using Trig Sub and Partial Fractions

$\displaystyle\int\frac{1}{x^4 + x^2 + 1}\mathrm{d}x$ using the trig substitution.

My attempt: I got $\left(x^2 + \frac{1}{2}\right)^2+\frac{3}{4}$ and did $x= \frac{1}{\sqrt2}\tan \theta$ but did not know how to proceed because I got $\displaystyle\int\frac{\sec^2\theta}{\sec^4\theta+ 3}\mathrm{d}\theta$ after factoring out the constant

• $$x^4+x^2+1=(x^2+1)^2-x^2=?$$ – lab bhattacharjee Jun 1 '17 at 5:52
• @labbhattacharjee But what trig sub would I use, that would get me sec^4 - tan^2 ? – Sanjoy Kundu Jun 1 '17 at 5:53
• Given lab's comments one sees how to find, $$x^4+x^2+1=(x^2+x+1)(x^2-x+1)$$ Now it is just a matter of tedious but manageable partial fractions use and trig substitution use. $$\frac{1}{x^4+x^2+1}=\frac{1}{2}\left(\frac{1-x}{x^2-x+1}+\frac{1+x}{x^2+x+1} \right)$$ $$=\frac{1}{2}\left(\frac{1-x}{(x-\frac{1}{2})^2+\frac{3}{4}}+\frac{1+x}{(x+\frac{1}{2})^2+\frac{3}{4} }\right)$$ – Ahmed S. Attaalla Jun 1 '17 at 6:03

HINT:

$$\dfrac2{x^4+x+1}=\dfrac{x^2+x+1-(x^2-x+1)}{x(x^2+x+1)(x^2-x+1)}=\dfrac1{x(x^2-x+1)}-\dfrac1{x(x^2+x+1)}$$

Set $2x+1=\sqrt3\tan y$ $$\int\dfrac1{x(x^2+x+1)}dx=\int\dfrac4{x\{(2x+1)^2+3\}}dx=\int\dfrac{4dy}{(\sqrt3\tan y-1)\sqrt3}$$

$$=\dfrac4{\sqrt3}\int\dfrac{\cos y}{\sqrt3\sin y-\cos y}dy$$

$$=-\dfrac2{\sqrt3}\int\dfrac{\cos\left(y+\dfrac\pi3-\dfrac\pi3\right)}{\cos\left(y+\dfrac\pi3\right)}dy$$

$$=-\dfrac1{\sqrt3}\int\dfrac{\cos\left(y+\dfrac\pi3\right)-\sqrt3\sin\left(y+\dfrac\pi3\right)}{\cos\left(y+\dfrac\pi3\right)}dy=?$$

HINT:

$$\dfrac2{x^4+x^2+1}=\dfrac{x^2+1}{x^4+x^2+1}-\dfrac{x^2-1}{x^4+x^2+1}$$

Now $\dfrac{x^2+1}{x^4+x^2+1}=\dfrac{1+\dfrac1{x^2}}{x^2+1+\dfrac1{x^2}}$

As $\displaystyle\int\left(1+\dfrac1{x^2}\right)dx=x-\dfrac1x,$

write $x^2+1+\dfrac1{x^2}=\left(x-\dfrac1x\right)^2+2+1$