# How to solve $\int \:\frac{3x^2+1}{x^3+2}dx$?

I am trying to solve the following integral:

$$\int \:\frac{3x^2+1}{x^3+2}dx$$

I am not sure how to do it. I tried using partial fractions but you can not factor $x^3+2$, and changing the variable with $u$ does not seem to work either. Anyone has any ideas?

• The easy part is $\frac{3x^2}{x^3+2}$ indeed $(\log x^3+2)'=\frac{3x^2}{x^3+2}$.
– user
Jul 23 '18 at 21:02
• But I guess that does not help at all because the remaining integral would be $\int \frac1{x^3+2}\mathrm{d}x$ and I am not sure how to solve this. Jul 23 '18 at 21:03
• You can factor any polynomial over $\mathbb{R}$ into linear or 2nd degree polynomials. Here,you can factor $x^3+2=(x+\sqrt 2)(x^2-\sqrt2x+\sqrt4)$, if its any help.
– Sar
Jul 23 '18 at 21:04
• Separate the two and in the second integral take sub $1+2/x^3=t$ Jul 23 '18 at 21:13
• This is it ! You can combine gimusi's trick and Dr. Sonnhard Graubner's answer. The linear and quadratic factors are mutually prime so you get $$\frac{1}{x^3+2}=\frac{A}{x+\sqrt{2}}+\frac{Bx+C}{x^2-\sqrt{2}x+2^{2/3}}$$ the second can be written $$\frac{\lambda Q'}{Q}+\frac{\mu}{Q}$$ where $$Q(x)=x^2-\sqrt{2}x+2^{2/3}$$ Jul 23 '18 at 21:19

Wolfy gives a number of forms, the first of which is

$\log(x^3 + 2) - \dfrac{\log(2^{1/3} x^2 - 2^{2/3} x + 2)}{6\ 2^{2/3}} + \dfrac{\log(2^{2/3} x + 2)}{3\ 2^{2/3}} + \dfrac{\tan^{-1}(\frac{2^{2/3} x - 1}{\sqrt{3}})}{2^{2/3} \sqrt{3}} +C$

Hint: write your integral in the form

$$\int \frac{3x^2+1}{(x+\sqrt{2})(x^2-\sqrt{2}x+2^{2/3})}dx$$

• I guess you could apply partial fractions to this "new" but it seems to me that this gets really messy. Is there no other way? Jul 23 '18 at 21:11
• I think here in this case is no other way, let me say i know no other way. Jul 23 '18 at 21:14
• Yes. Technically you can factor anything and apply partial fractions in the real numbers, but I was trying to avoid this. I suppose there truly is no other way. Thanks for your help! Jul 23 '18 at 21:15
• You can clean things up a little by doing a substitution $u = \frac{1}{\sqrt{2}}x$ first; doesn't help a lot, but it makes the numbers better. Jul 23 '18 at 21:19

Substitute $u=x^3$ and you can reduce it down to:

$$\frac13\int\frac{u^{-\frac23}}{u+2}du+\int\frac{1}{u+2}du$$

I believe it can be taken from here

$$I=\int \frac{3x^2+1}{x^3+2}dx=\int \frac{3x^2}{x^3+2}dx+\int \frac{dx}{x^3+2}$$ $$I=\log(x^3+2)+\int \frac{dx}{x^3+2}$$ For the remaining integral, let $$x=\sqrt2\, t\implies dx=\sqrt2\,dt$$ $$J=\int \frac{dx}{x^3+2}=\frac{\sqrt2}2 \int \frac{dt}{t^3+1}$$ Now $$t^3+1=(t-1)(t-a)(t-b)$$ Partial fraction decomposition $$\frac 1 {t^3+1}=\frac{1}{(a-1) (a-b) (t-a)}+\frac{1}{(b-1) (b-a) (t-b)}+\frac{1}{(a-1) (b-1) (t-1)}$$ Integrate to get a weighted sum of logarithms with complex values (the weights are complex too) and recombine them to get the answer already given.