### 3.12 $$\int \frac{d+e x^3}{x (a+b x^3+c x^6)} \, dx$$

Optimal. Leaf size=78 $\frac{(b d-2 a e) \tanh ^{-1}\left (\frac{b+2 c x^3}{\sqrt{b^2-4 a c}}\right )}{3 a \sqrt{b^2-4 a c}}-\frac{d \log \left (a+b x^3+c x^6\right )}{6 a}+\frac{d \log (x)}{a}$

[Out]

((b*d - 2*a*e)*ArcTanh[(b + 2*c*x^3)/Sqrt[b^2 - 4*a*c]])/(3*a*Sqrt[b^2 - 4*a*c]) + (d*Log[x])/a - (d*Log[a + b
*x^3 + c*x^6])/(6*a)

________________________________________________________________________________________

Rubi [A]  time = 0.127953, antiderivative size = 78, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 25, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.24, Rules used = {1474, 800, 634, 618, 206, 628} $\frac{(b d-2 a e) \tanh ^{-1}\left (\frac{b+2 c x^3}{\sqrt{b^2-4 a c}}\right )}{3 a \sqrt{b^2-4 a c}}-\frac{d \log \left (a+b x^3+c x^6\right )}{6 a}+\frac{d \log (x)}{a}$

Antiderivative was successfully veriﬁed.

[In]

Int[(d + e*x^3)/(x*(a + b*x^3 + c*x^6)),x]

[Out]

((b*d - 2*a*e)*ArcTanh[(b + 2*c*x^3)/Sqrt[b^2 - 4*a*c]])/(3*a*Sqrt[b^2 - 4*a*c]) + (d*Log[x])/a - (d*Log[a + b
*x^3 + c*x^6])/(6*a)

Rule 1474

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q_.), x_Symbol] :>
Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^n], x] /; FreeQ[{a,
b, c, d, e, m, n, p, q}, x] && EqQ[n2, 2*n] && IntegerQ[Simplify[(m + 1)/n]]

Rule 800

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[Exp
andIntegrand[((d + e*x)^m*(f + g*x))/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 -
4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[m]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
/; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{d+e x^3}{x \left (a+b x^3+c x^6\right )} \, dx &=\frac{1}{3} \operatorname{Subst}\left (\int \frac{d+e x}{x \left (a+b x+c x^2\right )} \, dx,x,x^3\right )\\ &=\frac{1}{3} \operatorname{Subst}\left (\int \left (\frac{d}{a x}+\frac{-b d+a e-c d x}{a \left (a+b x+c x^2\right )}\right ) \, dx,x,x^3\right )\\ &=\frac{d \log (x)}{a}+\frac{\operatorname{Subst}\left (\int \frac{-b d+a e-c d x}{a+b x+c x^2} \, dx,x,x^3\right )}{3 a}\\ &=\frac{d \log (x)}{a}-\frac{d \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^3\right )}{6 a}+\frac{(-b d+2 a e) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^3\right )}{6 a}\\ &=\frac{d \log (x)}{a}-\frac{d \log \left (a+b x^3+c x^6\right )}{6 a}-\frac{(-b d+2 a e) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^3\right )}{3 a}\\ &=\frac{(b d-2 a e) \tanh ^{-1}\left (\frac{b+2 c x^3}{\sqrt{b^2-4 a c}}\right )}{3 a \sqrt{b^2-4 a c}}+\frac{d \log (x)}{a}-\frac{d \log \left (a+b x^3+c x^6\right )}{6 a}\\ \end{align*}

Mathematica [C]  time = 0.0336629, size = 80, normalized size = 1.03 $\frac{d \log (x)}{a}-\frac{\text{RootSum}\left [\text{\#1}^3 b+\text{\#1}^6 c+a\& ,\frac{\text{\#1}^3 c d \log (x-\text{\#1})-a e \log (x-\text{\#1})+b d \log (x-\text{\#1})}{2 \text{\#1}^3 c+b}\& \right ]}{3 a}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(d + e*x^3)/(x*(a + b*x^3 + c*x^6)),x]

[Out]

(d*Log[x])/a - RootSum[a + b*#1^3 + c*#1^6 & , (b*d*Log[x - #1] - a*e*Log[x - #1] + c*d*Log[x - #1]*#1^3)/(b +
2*c*#1^3) & ]/(3*a)

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 106, normalized size = 1.4 \begin{align*}{\frac{d\ln \left ( x \right ) }{a}}-{\frac{d\ln \left ( c{x}^{6}+b{x}^{3}+a \right ) }{6\,a}}+{\frac{2\,e}{3}\arctan \left ({(2\,c{x}^{3}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{bd}{3\,a}\arctan \left ({(2\,c{x}^{3}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int((e*x^3+d)/x/(c*x^6+b*x^3+a),x)

[Out]

d*ln(x)/a-1/6*d*ln(c*x^6+b*x^3+a)/a+2/3/(4*a*c-b^2)^(1/2)*arctan((2*c*x^3+b)/(4*a*c-b^2)^(1/2))*e-1/3/a/(4*a*c
-b^2)^(1/2)*arctan((2*c*x^3+b)/(4*a*c-b^2)^(1/2))*b*d

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^3+d)/x/(c*x^6+b*x^3+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.19806, size = 556, normalized size = 7.13 \begin{align*} \left [-\frac{{\left (b^{2} - 4 \, a c\right )} d \log \left (c x^{6} + b x^{3} + a\right ) - 6 \,{\left (b^{2} - 4 \, a c\right )} d \log \left (x\right ) + \sqrt{b^{2} - 4 \, a c}{\left (b d - 2 \, a e\right )} \log \left (\frac{2 \, c^{2} x^{6} + 2 \, b c x^{3} + b^{2} - 2 \, a c -{\left (2 \, c x^{3} + b\right )} \sqrt{b^{2} - 4 \, a c}}{c x^{6} + b x^{3} + a}\right )}{6 \,{\left (a b^{2} - 4 \, a^{2} c\right )}}, -\frac{{\left (b^{2} - 4 \, a c\right )} d \log \left (c x^{6} + b x^{3} + a\right ) - 6 \,{\left (b^{2} - 4 \, a c\right )} d \log \left (x\right ) - 2 \, \sqrt{-b^{2} + 4 \, a c}{\left (b d - 2 \, a e\right )} \arctan \left (-\frac{{\left (2 \, c x^{3} + b\right )} \sqrt{-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right )}{6 \,{\left (a b^{2} - 4 \, a^{2} c\right )}}\right ] \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^3+d)/x/(c*x^6+b*x^3+a),x, algorithm="fricas")

[Out]

[-1/6*((b^2 - 4*a*c)*d*log(c*x^6 + b*x^3 + a) - 6*(b^2 - 4*a*c)*d*log(x) + sqrt(b^2 - 4*a*c)*(b*d - 2*a*e)*log
((2*c^2*x^6 + 2*b*c*x^3 + b^2 - 2*a*c - (2*c*x^3 + b)*sqrt(b^2 - 4*a*c))/(c*x^6 + b*x^3 + a)))/(a*b^2 - 4*a^2*
c), -1/6*((b^2 - 4*a*c)*d*log(c*x^6 + b*x^3 + a) - 6*(b^2 - 4*a*c)*d*log(x) - 2*sqrt(-b^2 + 4*a*c)*(b*d - 2*a*
e)*arctan(-(2*c*x^3 + b)*sqrt(-b^2 + 4*a*c)/(b^2 - 4*a*c)))/(a*b^2 - 4*a^2*c)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x**3+d)/x/(c*x**6+b*x**3+a),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.38437, size = 103, normalized size = 1.32 \begin{align*} -\frac{d \log \left (c x^{6} + b x^{3} + a\right )}{6 \, a} + \frac{d \log \left ({\left | x \right |}\right )}{a} - \frac{{\left (b d - 2 \, a e\right )} \arctan \left (\frac{2 \, c x^{3} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{3 \, \sqrt{-b^{2} + 4 \, a c} a} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^3+d)/x/(c*x^6+b*x^3+a),x, algorithm="giac")

[Out]

-1/6*d*log(c*x^6 + b*x^3 + a)/a + d*log(abs(x))/a - 1/3*(b*d - 2*a*e)*arctan((2*c*x^3 + b)/sqrt(-b^2 + 4*a*c))
/(sqrt(-b^2 + 4*a*c)*a)