Integrand size = 23, antiderivative size = 398 \[ \int \frac {a+b \arctan (c+d x)}{e+f x+g x^2} \, dx=\frac {(a+b \arctan (c+d x)) \log \left (-\frac {2 \left (2 c g-d \left (f-\sqrt {f^2-4 e g}\right )-2 g (c+d x)\right )}{\left (d f+2 i g-2 c g-d \sqrt {f^2-4 e g}\right ) (1-i (c+d x))}\right )}{\sqrt {f^2-4 e g}}-\frac {(a+b \arctan (c+d x)) \log \left (-\frac {2 \left (2 c g-d \left (f+\sqrt {f^2-4 e g}\right )-2 g (c+d x)\right )}{\left (2 (i-c) g+d \left (f+\sqrt {f^2-4 e g}\right )\right ) (1-i (c+d x))}\right )}{\sqrt {f^2-4 e g}}-\frac {i b \operatorname {PolyLog}\left (2,1+\frac {2 \left (2 c g-d \left (f-\sqrt {f^2-4 e g}\right )-2 g (c+d x)\right )}{\left (d f+2 i g-2 c g-d \sqrt {f^2-4 e g}\right ) (1-i (c+d x))}\right )}{2 \sqrt {f^2-4 e g}}+\frac {i b \operatorname {PolyLog}\left (2,1+\frac {2 \left (2 c g-d \left (f+\sqrt {f^2-4 e g}\right )-2 g (c+d x)\right )}{\left (2 (i-c) g+d \left (f+\sqrt {f^2-4 e g}\right )\right ) (1-i (c+d x))}\right )}{2 \sqrt {f^2-4 e g}} \] Output:
(a+b*arctan(d*x+c))*ln((-4*c*g+2*d*(f-(-4*e*g+f^2)^(1/2))+4*g*(d*x+c))/(d* f+2*I*g-2*c*g-d*(-4*e*g+f^2)^(1/2))/(1-I*(d*x+c)))/(-4*e*g+f^2)^(1/2)-(a+b *arctan(d*x+c))*ln((-4*c*g+2*d*(f+(-4*e*g+f^2)^(1/2))+4*g*(d*x+c))/(2*(I-c )*g+d*(f+(-4*e*g+f^2)^(1/2)))/(1-I*(d*x+c)))/(-4*e*g+f^2)^(1/2)-1/2*I*b*po lylog(2,1+2*(2*c*g-d*(f-(-4*e*g+f^2)^(1/2))-2*g*(d*x+c))/(d*f+2*I*g-2*c*g- d*(-4*e*g+f^2)^(1/2))/(1-I*(d*x+c)))/(-4*e*g+f^2)^(1/2)+1/2*I*b*polylog(2, 1+2*(2*c*g-d*(f+(-4*e*g+f^2)^(1/2))-2*g*(d*x+c))/(2*(I-c)*g+d*(f+(-4*e*g+f ^2)^(1/2)))/(1-I*(d*x+c)))/(-4*e*g+f^2)^(1/2)
Time = 0.54 (sec) , antiderivative size = 494, normalized size of antiderivative = 1.24 \[ \int \frac {a+b \arctan (c+d x)}{e+f x+g x^2} \, dx=-\frac {4 a \text {arctanh}\left (\frac {f+2 g x}{\sqrt {f^2-4 e g}}\right )-i b \log \left (\frac {d \left (-f+\sqrt {f^2-4 e g}-2 g x\right )}{2 (i+c) g+d \left (-f+\sqrt {f^2-4 e g}\right )}\right ) \log (1-i (c+d x))+i b \log \left (\frac {d \left (f+\sqrt {f^2-4 e g}+2 g x\right )}{-2 (i+c) g+d \left (f+\sqrt {f^2-4 e g}\right )}\right ) \log (1-i (c+d x))+i b \log \left (\frac {d \left (-f+\sqrt {f^2-4 e g}-2 g x\right )}{2 (-i+c) g+d \left (-f+\sqrt {f^2-4 e g}\right )}\right ) \log (1+i (c+d x))-i b \log \left (\frac {d \left (f+\sqrt {f^2-4 e g}+2 g x\right )}{-2 (-i+c) g+d \left (f+\sqrt {f^2-4 e g}\right )}\right ) \log (1+i (c+d x))+i b \operatorname {PolyLog}\left (2,\frac {2 g (-i+c+d x)}{2 (-i+c) g+d \left (-f+\sqrt {f^2-4 e g}\right )}\right )-i b \operatorname {PolyLog}\left (2,\frac {2 g (-i+c+d x)}{2 (-i+c) g-d \left (f+\sqrt {f^2-4 e g}\right )}\right )-i b \operatorname {PolyLog}\left (2,\frac {2 g (i+c+d x)}{2 (i+c) g+d \left (-f+\sqrt {f^2-4 e g}\right )}\right )+i b \operatorname {PolyLog}\left (2,\frac {2 g (i+c+d x)}{2 (i+c) g-d \left (f+\sqrt {f^2-4 e g}\right )}\right )}{2 \sqrt {f^2-4 e g}} \] Input:
Integrate[(a + b*ArcTan[c + d*x])/(e + f*x + g*x^2),x]
Output:
-1/2*(4*a*ArcTanh[(f + 2*g*x)/Sqrt[f^2 - 4*e*g]] - I*b*Log[(d*(-f + Sqrt[f ^2 - 4*e*g] - 2*g*x))/(2*(I + c)*g + d*(-f + Sqrt[f^2 - 4*e*g]))]*Log[1 - I*(c + d*x)] + I*b*Log[(d*(f + Sqrt[f^2 - 4*e*g] + 2*g*x))/(-2*(I + c)*g + d*(f + Sqrt[f^2 - 4*e*g]))]*Log[1 - I*(c + d*x)] + I*b*Log[(d*(-f + Sqrt[ f^2 - 4*e*g] - 2*g*x))/(2*(-I + c)*g + d*(-f + Sqrt[f^2 - 4*e*g]))]*Log[1 + I*(c + d*x)] - I*b*Log[(d*(f + Sqrt[f^2 - 4*e*g] + 2*g*x))/(-2*(-I + c)* g + d*(f + Sqrt[f^2 - 4*e*g]))]*Log[1 + I*(c + d*x)] + I*b*PolyLog[2, (2*g *(-I + c + d*x))/(2*(-I + c)*g + d*(-f + Sqrt[f^2 - 4*e*g]))] - I*b*PolyLo g[2, (2*g*(-I + c + d*x))/(2*(-I + c)*g - d*(f + Sqrt[f^2 - 4*e*g]))] - I* b*PolyLog[2, (2*g*(I + c + d*x))/(2*(I + c)*g + d*(-f + Sqrt[f^2 - 4*e*g]) )] + I*b*PolyLog[2, (2*g*(I + c + d*x))/(2*(I + c)*g - d*(f + Sqrt[f^2 - 4 *e*g]))])/Sqrt[f^2 - 4*e*g]
Time = 1.23 (sec) , antiderivative size = 427, normalized size of antiderivative = 1.07, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {7279, 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 {a+b \arctan (c+d x)}{e+f x+g x^2} \, dx\) |
\(\Big \downarrow \) 7279 |
\(\displaystyle \int \left (\frac {a}{e+f x+g x^2}+\frac {b \arctan (c+d x)}{e+f x+g x^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 a \text {arctanh}\left (\frac {f+2 g x}{\sqrt {f^2-4 e g}}\right )}{\sqrt {f^2-4 e g}}+\frac {b \arctan (c+d x) \log \left (-\frac {2 \left (-2 g (c+d x)+2 c g-d \left (f-\sqrt {f^2-4 e g}\right )\right )}{(1-i (c+d x)) \left (-2 c g-d \sqrt {f^2-4 e g}+d f+2 i g\right )}\right )}{\sqrt {f^2-4 e g}}-\frac {b \arctan (c+d x) \log \left (-\frac {2 \left (-2 g (c+d x)+2 c g-d \left (\sqrt {f^2-4 e g}+f\right )\right )}{(1-i (c+d x)) \left (d \left (\sqrt {f^2-4 e g}+f\right )+2 (-c+i) g\right )}\right )}{\sqrt {f^2-4 e g}}-\frac {i b \operatorname {PolyLog}\left (2,\frac {2 \left (2 c g-2 (c+d x) g-d \left (f-\sqrt {f^2-4 e g}\right )\right )}{\left (f d-\sqrt {f^2-4 e g} d-2 c g+2 i g\right ) (1-i (c+d x))}+1\right )}{2 \sqrt {f^2-4 e g}}+\frac {i b \operatorname {PolyLog}\left (2,\frac {2 \left (2 c g-2 (c+d x) g-d \left (f+\sqrt {f^2-4 e g}\right )\right )}{\left (2 (i-c) g+d \left (f+\sqrt {f^2-4 e g}\right )\right ) (1-i (c+d x))}+1\right )}{2 \sqrt {f^2-4 e g}}\) |
Input:
Int[(a + b*ArcTan[c + d*x])/(e + f*x + g*x^2),x]
Output:
(-2*a*ArcTanh[(f + 2*g*x)/Sqrt[f^2 - 4*e*g]])/Sqrt[f^2 - 4*e*g] + (b*ArcTa n[c + d*x]*Log[(-2*(2*c*g - d*(f - Sqrt[f^2 - 4*e*g]) - 2*g*(c + d*x)))/(( d*f + (2*I)*g - 2*c*g - d*Sqrt[f^2 - 4*e*g])*(1 - I*(c + d*x)))])/Sqrt[f^2 - 4*e*g] - (b*ArcTan[c + d*x]*Log[(-2*(2*c*g - d*(f + Sqrt[f^2 - 4*e*g]) - 2*g*(c + d*x)))/((2*(I - c)*g + d*(f + Sqrt[f^2 - 4*e*g]))*(1 - I*(c + d *x)))])/Sqrt[f^2 - 4*e*g] - ((I/2)*b*PolyLog[2, 1 + (2*(2*c*g - d*(f - Sqr t[f^2 - 4*e*g]) - 2*g*(c + d*x)))/((d*f + (2*I)*g - 2*c*g - d*Sqrt[f^2 - 4 *e*g])*(1 - I*(c + d*x)))])/Sqrt[f^2 - 4*e*g] + ((I/2)*b*PolyLog[2, 1 + (2 *(2*c*g - d*(f + Sqrt[f^2 - 4*e*g]) - 2*g*(c + d*x)))/((2*(I - c)*g + d*(f + Sqrt[f^2 - 4*e*g]))*(1 - I*(c + d*x)))])/Sqrt[f^2 - 4*e*g]
Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[ {v = RationalFunctionExpand[u/(a + b*x^n + c*x^(2*n)), x]}, Int[v, x] /; Su mQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 966 vs. \(2 (358 ) = 716\).
Time = 2.08 (sec) , antiderivative size = 967, normalized size of antiderivative = 2.43
method | result | size |
risch | \(\frac {d b \ln \left (-i d x -i c +1\right ) \ln \left (\frac {2 i c g -i f d +2 \left (-i d x -i c +1\right ) g -\sqrt {4 d^{2} e g -d^{2} f^{2}}-2 g}{2 i c g -i f d -\sqrt {4 d^{2} e g -d^{2} f^{2}}-2 g}\right )}{2 \sqrt {4 d^{2} e g -d^{2} f^{2}}}-\frac {d b \ln \left (-i d x -i c +1\right ) \ln \left (\frac {2 i c g -i f d +2 \left (-i d x -i c +1\right ) g +\sqrt {4 d^{2} e g -d^{2} f^{2}}-2 g}{2 i c g -i f d +\sqrt {4 d^{2} e g -d^{2} f^{2}}-2 g}\right )}{2 \sqrt {4 d^{2} e g -d^{2} f^{2}}}+\frac {d b \operatorname {dilog}\left (\frac {2 i c g -i f d +2 \left (-i d x -i c +1\right ) g -\sqrt {4 d^{2} e g -d^{2} f^{2}}-2 g}{2 i c g -i f d -\sqrt {4 d^{2} e g -d^{2} f^{2}}-2 g}\right )}{2 \sqrt {4 d^{2} e g -d^{2} f^{2}}}-\frac {d b \operatorname {dilog}\left (\frac {2 i c g -i f d +2 \left (-i d x -i c +1\right ) g +\sqrt {4 d^{2} e g -d^{2} f^{2}}-2 g}{2 i c g -i f d +\sqrt {4 d^{2} e g -d^{2} f^{2}}-2 g}\right )}{2 \sqrt {4 d^{2} e g -d^{2} f^{2}}}-\frac {2 i d a \arctan \left (\frac {2 i c g -i f d +2 \left (-i d x -i c +1\right ) g -2 g}{\sqrt {-4 d^{2} e g +d^{2} f^{2}}}\right )}{\sqrt {-4 d^{2} e g +d^{2} f^{2}}}+\frac {b d \ln \left (i d x +i c +1\right ) \ln \left (\frac {2 i c g -i f d -2 \left (i d x +i c +1\right ) g +\sqrt {4 d^{2} e g -d^{2} f^{2}}+2 g}{2 i c g -i f d +2 g +\sqrt {4 d^{2} e g -d^{2} f^{2}}}\right )}{2 \sqrt {4 d^{2} e g -d^{2} f^{2}}}-\frac {b d \ln \left (i d x +i c +1\right ) \ln \left (\frac {2 i c g -i f d -2 \left (i d x +i c +1\right ) g -\sqrt {4 d^{2} e g -d^{2} f^{2}}+2 g}{2 i c g -i f d +2 g -\sqrt {4 d^{2} e g -d^{2} f^{2}}}\right )}{2 \sqrt {4 d^{2} e g -d^{2} f^{2}}}+\frac {b d \operatorname {dilog}\left (\frac {2 i c g -i f d -2 \left (i d x +i c +1\right ) g +\sqrt {4 d^{2} e g -d^{2} f^{2}}+2 g}{2 i c g -i f d +2 g +\sqrt {4 d^{2} e g -d^{2} f^{2}}}\right )}{2 \sqrt {4 d^{2} e g -d^{2} f^{2}}}-\frac {b d \operatorname {dilog}\left (\frac {2 i c g -i f d -2 \left (i d x +i c +1\right ) g -\sqrt {4 d^{2} e g -d^{2} f^{2}}+2 g}{2 i c g -i f d +2 g -\sqrt {4 d^{2} e g -d^{2} f^{2}}}\right )}{2 \sqrt {4 d^{2} e g -d^{2} f^{2}}}\) | \(967\) |
parts | \(\text {Expression too large to display}\) | \(4790\) |
derivativedivides | \(\text {Expression too large to display}\) | \(4813\) |
default | \(\text {Expression too large to display}\) | \(4813\) |
Input:
int((a+b*arctan(d*x+c))/(g*x^2+f*x+e),x,method=_RETURNVERBOSE)
Output:
1/2*d*b*ln(1-I*c-I*d*x)/(4*d^2*e*g-d^2*f^2)^(1/2)*ln((2*I*c*g-I*f*d+2*(1-I *c-I*d*x)*g-(4*d^2*e*g-d^2*f^2)^(1/2)-2*g)/(2*I*c*g-I*f*d-(4*d^2*e*g-d^2*f ^2)^(1/2)-2*g))-1/2*d*b*ln(1-I*c-I*d*x)/(4*d^2*e*g-d^2*f^2)^(1/2)*ln((2*I* c*g-I*f*d+2*(1-I*c-I*d*x)*g+(4*d^2*e*g-d^2*f^2)^(1/2)-2*g)/(2*I*c*g-I*f*d+ (4*d^2*e*g-d^2*f^2)^(1/2)-2*g))+1/2*d*b/(4*d^2*e*g-d^2*f^2)^(1/2)*dilog((2 *I*c*g-I*f*d+2*(1-I*c-I*d*x)*g-(4*d^2*e*g-d^2*f^2)^(1/2)-2*g)/(2*I*c*g-I*f *d-(4*d^2*e*g-d^2*f^2)^(1/2)-2*g))-1/2*d*b/(4*d^2*e*g-d^2*f^2)^(1/2)*dilog ((2*I*c*g-I*f*d+2*(1-I*c-I*d*x)*g+(4*d^2*e*g-d^2*f^2)^(1/2)-2*g)/(2*I*c*g- I*f*d+(4*d^2*e*g-d^2*f^2)^(1/2)-2*g))-2*I*d*a/(-4*d^2*e*g+d^2*f^2)^(1/2)*a rctan((2*I*c*g-I*f*d+2*(1-I*c-I*d*x)*g-2*g)/(-4*d^2*e*g+d^2*f^2)^(1/2))+1/ 2*b*d*ln(1+I*c+I*d*x)/(4*d^2*e*g-d^2*f^2)^(1/2)*ln((2*I*c*g-I*f*d-2*(1+I*c +I*d*x)*g+(4*d^2*e*g-d^2*f^2)^(1/2)+2*g)/(2*I*c*g-I*f*d+2*g+(4*d^2*e*g-d^2 *f^2)^(1/2)))-1/2*b*d*ln(1+I*c+I*d*x)/(4*d^2*e*g-d^2*f^2)^(1/2)*ln((2*I*c* g-I*f*d-2*(1+I*c+I*d*x)*g-(4*d^2*e*g-d^2*f^2)^(1/2)+2*g)/(2*I*c*g-I*f*d+2* g-(4*d^2*e*g-d^2*f^2)^(1/2)))+1/2*b*d/(4*d^2*e*g-d^2*f^2)^(1/2)*dilog((2*I *c*g-I*f*d-2*(1+I*c+I*d*x)*g+(4*d^2*e*g-d^2*f^2)^(1/2)+2*g)/(2*I*c*g-I*f*d +2*g+(4*d^2*e*g-d^2*f^2)^(1/2)))-1/2*b*d/(4*d^2*e*g-d^2*f^2)^(1/2)*dilog(( 2*I*c*g-I*f*d-2*(1+I*c+I*d*x)*g-(4*d^2*e*g-d^2*f^2)^(1/2)+2*g)/(2*I*c*g-I* f*d+2*g-(4*d^2*e*g-d^2*f^2)^(1/2)))
\[ \int \frac {a+b \arctan (c+d x)}{e+f x+g x^2} \, dx=\int { \frac {b \arctan \left (d x + c\right ) + a}{g x^{2} + f x + e} \,d x } \] Input:
integrate((a+b*arctan(d*x+c))/(g*x^2+f*x+e),x, algorithm="fricas")
Output:
integral((b*arctan(d*x + c) + a)/(g*x^2 + f*x + e), x)
Timed out. \[ \int \frac {a+b \arctan (c+d x)}{e+f x+g x^2} \, dx=\text {Timed out} \] Input:
integrate((a+b*atan(d*x+c))/(g*x**2+f*x+e),x)
Output:
Timed out
Exception generated. \[ \int \frac {a+b \arctan (c+d x)}{e+f x+g x^2} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((a+b*arctan(d*x+c))/(g*x^2+f*x+e),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*e*g-f^2>0)', see `assume?` for more deta
\[ \int \frac {a+b \arctan (c+d x)}{e+f x+g x^2} \, dx=\int { \frac {b \arctan \left (d x + c\right ) + a}{g x^{2} + f x + e} \,d x } \] Input:
integrate((a+b*arctan(d*x+c))/(g*x^2+f*x+e),x, algorithm="giac")
Output:
integrate((b*arctan(d*x + c) + a)/(g*x^2 + f*x + e), x)
Timed out. \[ \int \frac {a+b \arctan (c+d x)}{e+f x+g x^2} \, dx=\int \frac {a+b\,\mathrm {atan}\left (c+d\,x\right )}{g\,x^2+f\,x+e} \,d x \] Input:
int((a + b*atan(c + d*x))/(e + f*x + g*x^2),x)
Output:
int((a + b*atan(c + d*x))/(e + f*x + g*x^2), x)
\[ \int \frac {a+b \arctan (c+d x)}{e+f x+g x^2} \, dx =\text {Too large to display} \] Input:
int((a+b*atan(d*x+c))/(g*x^2+f*x+e),x)
Output:
(4*atan(c + d*x)**2*b*c*e*g - atan(c + d*x)**2*b*c*f**2 + 2*sqrt(4*e*g - f **2)*atan((f + 2*g*x)/sqrt(4*e*g - f**2))*a*f + 4*int(atan(c + d*x)/(c**2* e + c**2*f*x + c**2*g*x**2 + 2*c*d*e*x + 2*c*d*f*x**2 + 2*c*d*g*x**3 + d** 2*e*x**2 + d**2*f*x**3 + d**2*g*x**4 + e + f*x + g*x**2),x)*b*c**2*e*f*g - int(atan(c + d*x)/(c**2*e + c**2*f*x + c**2*g*x**2 + 2*c*d*e*x + 2*c*d*f* x**2 + 2*c*d*g*x**3 + d**2*e*x**2 + d**2*f*x**3 + d**2*g*x**4 + e + f*x + g*x**2),x)*b*c**2*f**3 - 8*int(atan(c + d*x)/(c**2*e + c**2*f*x + c**2*g*x **2 + 2*c*d*e*x + 2*c*d*f*x**2 + 2*c*d*g*x**3 + d**2*e*x**2 + d**2*f*x**3 + d**2*g*x**4 + e + f*x + g*x**2),x)*b*c*d*e**2*g + 2*int(atan(c + d*x)/(c **2*e + c**2*f*x + c**2*g*x**2 + 2*c*d*e*x + 2*c*d*f*x**2 + 2*c*d*g*x**3 + d**2*e*x**2 + d**2*f*x**3 + d**2*g*x**4 + e + f*x + g*x**2),x)*b*c*d*e*f* *2 + 4*int(atan(c + d*x)/(c**2*e + c**2*f*x + c**2*g*x**2 + 2*c*d*e*x + 2* c*d*f*x**2 + 2*c*d*g*x**3 + d**2*e*x**2 + d**2*f*x**3 + d**2*g*x**4 + e + f*x + g*x**2),x)*b*e*f*g - int(atan(c + d*x)/(c**2*e + c**2*f*x + c**2*g*x **2 + 2*c*d*e*x + 2*c*d*f*x**2 + 2*c*d*g*x**3 + d**2*e*x**2 + d**2*f*x**3 + d**2*g*x**4 + e + f*x + g*x**2),x)*b*f**3 - 8*int((atan(c + d*x)*x**2)/( c**2*e + c**2*f*x + c**2*g*x**2 + 2*c*d*e*x + 2*c*d*f*x**2 + 2*c*d*g*x**3 + d**2*e*x**2 + d**2*f*x**3 + d**2*g*x**4 + e + f*x + g*x**2),x)*b*c*d*e*g **2 + 2*int((atan(c + d*x)*x**2)/(c**2*e + c**2*f*x + c**2*g*x**2 + 2*c*d* e*x + 2*c*d*f*x**2 + 2*c*d*g*x**3 + d**2*e*x**2 + d**2*f*x**3 + d**2*g*...