Integrand size = 25, antiderivative size = 123 \[ \int \frac {1}{(1-x) (1+x) \left (a+b x+c x^2\right )} \, dx=\frac {\left (b^2-2 a c-2 c^2\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{(a-b+c) (a+b+c) \sqrt {b^2-4 a c}}-\frac {\log (1-x)}{2 (a+b+c)}+\frac {\log (1+x)}{2 (a-b+c)}-\frac {b \log \left (a+b x+c x^2\right )}{2 (a-b+c) (a+b+c)} \] Output:
(-2*a*c+b^2-2*c^2)*arctanh((2*c*x+b)/(-4*a*c+b^2)^(1/2))/(a-b+c)/(a+b+c)/( -4*a*c+b^2)^(1/2)-ln(1-x)/(2*a+2*b+2*c)+ln(1+x)/(2*a-2*b+2*c)-1/2*b*ln(c*x ^2+b*x+a)/(a-b+c)/(a+b+c)
Time = 0.13 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.96 \[ \int \frac {1}{(1-x) (1+x) \left (a+b x+c x^2\right )} \, dx=\frac {\left (-2 b^2+4 c (a+c)\right ) \arctan \left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )+\sqrt {-b^2+4 a c} (-((a-b+c) \log (-1+x))+(a+b+c) \log (1+x)-b \log (a+x (b+c x)))}{2 (a-b+c) (a+b+c) \sqrt {-b^2+4 a c}} \] Input:
Integrate[1/((1 - x)*(1 + x)*(a + b*x + c*x^2)),x]
Output:
((-2*b^2 + 4*c*(a + c))*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]] + Sqrt[-b^2 + 4*a*c]*(-((a - b + c)*Log[-1 + x]) + (a + b + c)*Log[1 + x] - b*Log[a + x*(b + c*x)]))/(2*(a - b + c)*(a + b + c)*Sqrt[-b^2 + 4*a*c])
Time = 0.33 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.98, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {1188, 1301, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{(1-x) (x+1) \left (a+b x+c x^2\right )} \, dx\) |
\(\Big \downarrow \) 1188 |
\(\displaystyle \int \frac {1}{\left (1-x^2\right ) \left (a+b x+c x^2\right )}dx\) |
\(\Big \downarrow \) 1301 |
\(\displaystyle -\int \left (\frac {b^2+c x b-c (a+c)}{(a-b+c) (a+b+c) \left (c x^2+b x+a\right )}-\frac {1}{2 (a+b+c) (1-x)}-\frac {1}{2 (a-b+c) (x+1)}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\left (b^2-2 c (a+c)\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{(a-b+c) (a+b+c) \sqrt {b^2-4 a c}}-\frac {b \log \left (a+b x+c x^2\right )}{2 (a-b+c) (a+b+c)}-\frac {\log (1-x)}{2 (a+b+c)}+\frac {\log (x+1)}{2 (a-b+c)}\) |
Input:
Int[1/((1 - x)*(1 + x)*(a + b*x + c*x^2)),x]
Output:
((b^2 - 2*c*(a + c))*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/((a - b + c)* (a + b + c)*Sqrt[b^2 - 4*a*c]) - Log[1 - x]/(2*(a + b + c)) + Log[1 + x]/( 2*(a - b + c)) - (b*Log[a + b*x + c*x^2])/(2*(a - b + c)*(a + b + c))
Int[((d_) + (e_.)*(x_))^(m_.)*((f_) + (g_.)*(x_))^(n_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d*f + e*g*x^2)^m*(a + b*x + c*x^2 )^p, x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[m, n] && EqQ[e*f + d*g, 0] && (IntegerQ[m] || (GtQ[d, 0] && GtQ[f, 0]))
Int[((a_.) + (c_.)*(x_)^2)^(p_)*((d_.) + (e_.)*(x_) + (f_.)*(x_)^2)^(q_), x _Symbol] :> With[{r = Rt[(-a)*c, 2]}, Simp[1/c^p Int[ExpandIntegrand[(-r + c*x)^p*(r + c*x)^p*(d + e*x + f*x^2)^q, x], x], x] /; EqQ[p, -1] || !Fra ctionalPowerFactorQ[r]] /; FreeQ[{a, c, d, e, f}, x] && ILtQ[p, 0] && Integ erQ[q] && NiceSqrtQ[(-a)*c]
Time = 1.87 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.92
method | result | size |
default | \(\frac {\ln \left (x +1\right )}{2 a -2 b +2 c}-\frac {\ln \left (x -1\right )}{2 a +2 b +2 c}+\frac {-\frac {b \ln \left (c \,x^{2}+b x +a \right )}{2}+\frac {2 \left (a c -\frac {1}{2} b^{2}+c^{2}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{\left (a -b +c \right ) \left (a +b +c \right )}\) | \(113\) |
risch | \(-\frac {\ln \left (1-x \right )}{2 \left (a +b +c \right )}+\frac {\ln \left (-x -1\right )}{2 a -2 b +2 c}+\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\left (4 c \,a^{3}-a^{2} b^{2}+8 a^{2} c^{2}-6 c a \,b^{2}+4 c^{3} a +b^{4}-b^{2} c^{2}\right ) \textit {\_Z}^{2}+\left (4 a b c -b^{3}\right ) \textit {\_Z} +c^{2}\right )}{\sum }\textit {\_R} \ln \left (\left (\left (-8 c \,a^{3}+2 a^{2} b^{2}-8 a^{2} c^{2}-20 c a \,b^{2}+8 c^{3} a +6 b^{4}-6 b^{2} c^{2}+8 c^{4}\right ) \textit {\_R}^{2}+\left (-12 a b c +3 b^{3}-12 b \,c^{2}\right ) \textit {\_R} -4 c^{2}\right ) x +\left (-28 c \,a^{2} b +8 a \,b^{3}-24 a b \,c^{2}+4 b^{3} c +4 b \,c^{3}\right ) \textit {\_R}^{2}+\left (-4 a^{2} c +a \,b^{2}-8 a \,c^{2}-3 b^{2} c -4 c^{3}\right ) \textit {\_R} -b c \right )\right )\) | \(265\) |
Input:
int(1/(1-x)/(x+1)/(c*x^2+b*x+a),x,method=_RETURNVERBOSE)
Output:
ln(x+1)/(2*a-2*b+2*c)-1/(2*a+2*b+2*c)*ln(x-1)+1/(a-b+c)/(a+b+c)*(-1/2*b*ln (c*x^2+b*x+a)+2*(a*c-1/2*b^2+c^2)/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a* c-b^2)^(1/2)))
Time = 0.67 (sec) , antiderivative size = 447, normalized size of antiderivative = 3.63 \[ \int \frac {1}{(1-x) (1+x) \left (a+b x+c x^2\right )} \, dx=\left [-\frac {{\left (b^{2} - 2 \, a c - 2 \, c^{2}\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c - \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) + {\left (b^{3} - 4 \, a b c\right )} \log \left (c x^{2} + b x + a\right ) - {\left (a b^{2} + b^{3} - 4 \, a c^{2} - {\left (4 \, a^{2} + 4 \, a b - b^{2}\right )} c\right )} \log \left (x + 1\right ) + {\left (a b^{2} - b^{3} - 4 \, a c^{2} - {\left (4 \, a^{2} - 4 \, a b - b^{2}\right )} c\right )} \log \left (x - 1\right )}{2 \, {\left (a^{2} b^{2} - b^{4} - 4 \, a c^{3} - {\left (8 \, a^{2} - b^{2}\right )} c^{2} - 2 \, {\left (2 \, a^{3} - 3 \, a b^{2}\right )} c\right )}}, \frac {2 \, {\left (b^{2} - 2 \, a c - 2 \, c^{2}\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) - {\left (b^{3} - 4 \, a b c\right )} \log \left (c x^{2} + b x + a\right ) + {\left (a b^{2} + b^{3} - 4 \, a c^{2} - {\left (4 \, a^{2} + 4 \, a b - b^{2}\right )} c\right )} \log \left (x + 1\right ) - {\left (a b^{2} - b^{3} - 4 \, a c^{2} - {\left (4 \, a^{2} - 4 \, a b - b^{2}\right )} c\right )} \log \left (x - 1\right )}{2 \, {\left (a^{2} b^{2} - b^{4} - 4 \, a c^{3} - {\left (8 \, a^{2} - b^{2}\right )} c^{2} - 2 \, {\left (2 \, a^{3} - 3 \, a b^{2}\right )} c\right )}}\right ] \] Input:
integrate(1/(1-x)/(1+x)/(c*x^2+b*x+a),x, algorithm="fricas")
Output:
[-1/2*((b^2 - 2*a*c - 2*c^2)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^2 + 2*b*c*x + b^2 - 2*a*c - sqrt(b^2 - 4*a*c)*(2*c*x + b))/(c*x^2 + b*x + a)) + (b^3 - 4 *a*b*c)*log(c*x^2 + b*x + a) - (a*b^2 + b^3 - 4*a*c^2 - (4*a^2 + 4*a*b - b ^2)*c)*log(x + 1) + (a*b^2 - b^3 - 4*a*c^2 - (4*a^2 - 4*a*b - b^2)*c)*log( x - 1))/(a^2*b^2 - b^4 - 4*a*c^3 - (8*a^2 - b^2)*c^2 - 2*(2*a^3 - 3*a*b^2) *c), 1/2*(2*(b^2 - 2*a*c - 2*c^2)*sqrt(-b^2 + 4*a*c)*arctan(-sqrt(-b^2 + 4 *a*c)*(2*c*x + b)/(b^2 - 4*a*c)) - (b^3 - 4*a*b*c)*log(c*x^2 + b*x + a) + (a*b^2 + b^3 - 4*a*c^2 - (4*a^2 + 4*a*b - b^2)*c)*log(x + 1) - (a*b^2 - b^ 3 - 4*a*c^2 - (4*a^2 - 4*a*b - b^2)*c)*log(x - 1))/(a^2*b^2 - b^4 - 4*a*c^ 3 - (8*a^2 - b^2)*c^2 - 2*(2*a^3 - 3*a*b^2)*c)]
Timed out. \[ \int \frac {1}{(1-x) (1+x) \left (a+b x+c x^2\right )} \, dx=\text {Timed out} \] Input:
integrate(1/(1-x)/(1+x)/(c*x**2+b*x+a),x)
Output:
Timed out
Exception generated. \[ \int \frac {1}{(1-x) (1+x) \left (a+b x+c x^2\right )} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(1/(1-x)/(1+x)/(c*x^2+b*x+a),x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` for more deta
Time = 0.12 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.02 \[ \int \frac {1}{(1-x) (1+x) \left (a+b x+c x^2\right )} \, dx=-\frac {b \log \left (c x^{2} + b x + a\right )}{2 \, {\left (a^{2} - b^{2} + 2 \, a c + c^{2}\right )}} - \frac {{\left (b^{2} - 2 \, a c - 2 \, c^{2}\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{{\left (a^{2} - b^{2} + 2 \, a c + c^{2}\right )} \sqrt {-b^{2} + 4 \, a c}} + \frac {\log \left ({\left | x + 1 \right |}\right )}{2 \, {\left (a - b + c\right )}} - \frac {\log \left ({\left | x - 1 \right |}\right )}{2 \, {\left (a + b + c\right )}} \] Input:
integrate(1/(1-x)/(1+x)/(c*x^2+b*x+a),x, algorithm="giac")
Output:
-1/2*b*log(c*x^2 + b*x + a)/(a^2 - b^2 + 2*a*c + c^2) - (b^2 - 2*a*c - 2*c ^2)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/((a^2 - b^2 + 2*a*c + c^2)*sqrt (-b^2 + 4*a*c)) + 1/2*log(abs(x + 1))/(a - b + c) - 1/2*log(abs(x - 1))/(a + b + c)
Time = 1.95 (sec) , antiderivative size = 993, normalized size of antiderivative = 8.07 \[ \int \frac {1}{(1-x) (1+x) \left (a+b x+c x^2\right )} \, dx =\text {Too large to display} \] Input:
int(-1/((x - 1)*(x + 1)*(a + b*x + c*x^2)),x)
Output:
log(x + 1)/(2*(a - b + c)) - log(x - 1)/(2*(a + b + c)) + (log(b*c^2 + 4*c ^3*x + ((a*(4*b*c - 2*c*(b^2 - 4*a*c)^(1/2)) - b^3 + b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2 - 6*b^2*c^3 - 20*a*b^2*c^2 + 2*a^2*b^2*c) + 4 *b^3*c^2 - 28*a^2*b*c^2 - 24*a*b*c^3 + 8*a*b^3*c))/(b^2*(12*a*c + 2*a^2 - 2*b^2 + 2*c^2) - 4*a*c*(4*a*c + 2*a^2 + 2*c^2)) - a*b^2*c))/(b^2*(12*a*c + 2*a^2 - 2*b^2 + 2*c^2) - 4*a*c*(4*a*c + 2*a^2 + 2*c^2)))*(a*(4*b*c + 2...
Time = 0.17 (sec) , antiderivative size = 308, normalized size of antiderivative = 2.50 \[ \int \frac {1}{(1-x) (1+x) \left (a+b x+c x^2\right )} \, dx=\frac {4 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) a c -2 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) b^{2}+4 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) c^{2}-4 \,\mathrm {log}\left (c \,x^{2}+b x +a \right ) a b c +\mathrm {log}\left (c \,x^{2}+b x +a \right ) b^{3}-4 \,\mathrm {log}\left (x -1\right ) a^{2} c +\mathrm {log}\left (x -1\right ) a \,b^{2}+4 \,\mathrm {log}\left (x -1\right ) a b c -4 \,\mathrm {log}\left (x -1\right ) a \,c^{2}-\mathrm {log}\left (x -1\right ) b^{3}+\mathrm {log}\left (x -1\right ) b^{2} c +4 \,\mathrm {log}\left (x +1\right ) a^{2} c -\mathrm {log}\left (x +1\right ) a \,b^{2}+4 \,\mathrm {log}\left (x +1\right ) a b c +4 \,\mathrm {log}\left (x +1\right ) a \,c^{2}-\mathrm {log}\left (x +1\right ) b^{3}-\mathrm {log}\left (x +1\right ) b^{2} c}{8 a^{3} c -2 a^{2} b^{2}+16 a^{2} c^{2}-12 a \,b^{2} c +8 a \,c^{3}+2 b^{4}-2 b^{2} c^{2}} \] Input:
int(1/(1-x)/(1+x)/(c*x^2+b*x+a),x)
Output:
(4*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*a*c - 2*sqrt(4* a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*b**2 + 4*sqrt(4*a*c - b** 2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*c**2 - 4*log(a + b*x + c*x**2)*a*b *c + log(a + b*x + c*x**2)*b**3 - 4*log(x - 1)*a**2*c + log(x - 1)*a*b**2 + 4*log(x - 1)*a*b*c - 4*log(x - 1)*a*c**2 - log(x - 1)*b**3 + log(x - 1)* b**2*c + 4*log(x + 1)*a**2*c - log(x + 1)*a*b**2 + 4*log(x + 1)*a*b*c + 4* log(x + 1)*a*c**2 - log(x + 1)*b**3 - log(x + 1)*b**2*c)/(2*(4*a**3*c - a* *2*b**2 + 8*a**2*c**2 - 6*a*b**2*c + 4*a*c**3 + b**4 - b**2*c**2))