\(\int \frac {a+b x^2}{(c+d x^2) (e+f x^2)^2} \, dx\) [220]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F(-1)]
Maxima [F(-2)]
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 140 \[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \left (e+f x^2\right )^2} \, dx=\frac {(b e-a f) x}{2 e (d e-c f) \left (e+f x^2\right )}-\frac {\sqrt {d} (b c-a d) \arctan \left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{\sqrt {c} (d e-c f)^2}-\frac {(a f (3 d e-c f)-b e (d e+c f)) \arctan \left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{2 e^{3/2} \sqrt {f} (d e-c f)^2} \] Output:

1/2*(-a*f+b*e)*x/e/(-c*f+d*e)/(f*x^2+e)-d^(1/2)*(-a*d+b*c)*arctan(d^(1/2)* 
x/c^(1/2))/c^(1/2)/(-c*f+d*e)^2-1/2*(a*f*(-c*f+3*d*e)-b*e*(c*f+d*e))*arcta 
n(f^(1/2)*x/e^(1/2))/e^(3/2)/f^(1/2)/(-c*f+d*e)^2
 

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.89 \[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \left (e+f x^2\right )^2} \, dx=\frac {\frac {(b e-a f) (d e-c f) x}{e \left (e+f x^2\right )}+\frac {2 \sqrt {d} (-b c+a d) \arctan \left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{\sqrt {c}}+\frac {(a f (-3 d e+c f)+b e (d e+c f)) \arctan \left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{e^{3/2} \sqrt {f}}}{2 (d e-c f)^2} \] Input:

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

Output:

(((b*e - a*f)*(d*e - c*f)*x)/(e*(e + f*x^2)) + (2*Sqrt[d]*(-(b*c) + a*d)*A 
rcTan[(Sqrt[d]*x)/Sqrt[c]])/Sqrt[c] + ((a*f*(-3*d*e + c*f) + b*e*(d*e + c* 
f))*ArcTan[(Sqrt[f]*x)/Sqrt[e]])/(e^(3/2)*Sqrt[f]))/(2*(d*e - c*f)^2)
 

Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.11, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {402, 25, 397, 218}

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 x^2}{\left (c+d x^2\right ) \left (e+f x^2\right )^2} \, dx\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\int -\frac {-d (b e-a f) x^2+b c e-2 a d e+a c f}{\left (d x^2+c\right ) \left (f x^2+e\right )}dx}{2 e (d e-c f)}+\frac {x (b e-a f)}{2 e \left (e+f x^2\right ) (d e-c f)}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {x (b e-a f)}{2 e \left (e+f x^2\right ) (d e-c f)}-\frac {\int \frac {-d (b e-a f) x^2+b c e-2 a d e+a c f}{\left (d x^2+c\right ) \left (f x^2+e\right )}dx}{2 e (d e-c f)}\)

\(\Big \downarrow \) 397

\(\displaystyle \frac {x (b e-a f)}{2 e \left (e+f x^2\right ) (d e-c f)}-\frac {\frac {2 d e (b c-a d) \int \frac {1}{d x^2+c}dx}{d e-c f}+\frac {(a f (3 d e-c f)-b e (c f+d e)) \int \frac {1}{f x^2+e}dx}{d e-c f}}{2 e (d e-c f)}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {x (b e-a f)}{2 e \left (e+f x^2\right ) (d e-c f)}-\frac {\frac {2 \sqrt {d} e (b c-a d) \arctan \left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{\sqrt {c} (d e-c f)}+\frac {\arctan \left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) (a f (3 d e-c f)-b e (c f+d e))}{\sqrt {e} \sqrt {f} (d e-c f)}}{2 e (d e-c f)}\)

Input:

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

Output:

((b*e - a*f)*x)/(2*e*(d*e - c*f)*(e + f*x^2)) - ((2*Sqrt[d]*(b*c - a*d)*e* 
ArcTan[(Sqrt[d]*x)/Sqrt[c]])/(Sqrt[c]*(d*e - c*f)) + ((a*f*(3*d*e - c*f) - 
 b*e*(d*e + c*f))*ArcTan[(Sqrt[f]*x)/Sqrt[e]])/(Sqrt[e]*Sqrt[f]*(d*e - c*f 
)))/(2*e*(d*e - c*f))
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 397
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ 
Symbol] :> Simp[(b*e - a*f)/(b*c - a*d)   Int[1/(a + b*x^2), x], x] - Simp[ 
(d*e - c*f)/(b*c - a*d)   Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e 
, f}, x]
 

rule 402
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_.)*((e_) + (f_.)*(x 
_)^2), x_Symbol] :> Simp[(-(b*e - a*f))*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^ 
(q + 1)/(a*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) 
 Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(b*e - a*f) + e*2*(b*c - a*d) 
*(p + 1) + d*(b*e - a*f)*(2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b 
, c, d, e, f, q}, x] && LtQ[p, -1]
 
Maple [A] (verified)

Time = 0.68 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.94

method result size
default \(\frac {\frac {\left (a c \,f^{2}-a d e f -b c e f +b d \,e^{2}\right ) x}{2 e \left (f \,x^{2}+e \right )}+\frac {\left (a c \,f^{2}-3 a d e f +b c e f +b d \,e^{2}\right ) \arctan \left (\frac {f x}{\sqrt {e f}}\right )}{2 e \sqrt {e f}}}{\left (c f -d e \right )^{2}}+\frac {\left (a d -b c \right ) d \arctan \left (\frac {x d}{\sqrt {c d}}\right )}{\left (c f -d e \right )^{2} \sqrt {c d}}\) \(131\)
risch \(\text {Expression too large to display}\) \(2213\)

Input:

int((b*x^2+a)/(d*x^2+c)/(f*x^2+e)^2,x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [A] (verification not implemented)

Time = 0.60 (sec) , antiderivative size = 997, normalized size of antiderivative = 7.12 \[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \left (e+f x^2\right )^2} \, dx =\text {Too large to display} \] Input:

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

Output:

[-1/4*(2*((b*c - a*d)*e^2*f^2*x^2 + (b*c - a*d)*e^3*f)*sqrt(-d/c)*log((d*x 
^2 + 2*c*x*sqrt(-d/c) - c)/(d*x^2 + c)) + (b*d*e^3 + a*c*e*f^2 + (b*c - 3* 
a*d)*e^2*f + (b*d*e^2*f + a*c*f^3 + (b*c - 3*a*d)*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*a*d)*e^2*f + (b*d*e^2*f + a*c*f^3 + 
(b*c - 3*a*d)*e*f^2)*x^2)*sqrt(e*f)*arctan(sqrt(e*f)*x/e) - (b*d*e^3*f + a 
*c*e*f^3 - (b*c + a*d)*e^2*f^2)*x)/(d^2*e^5*f - 2*c*d*e^4*f^2 + c^2*e^3...
 

Sympy [F(-1)]

Timed out. \[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \left (e+f x^2\right )^2} \, dx=\text {Timed out} \] Input:

integrate((b*x**2+a)/(d*x**2+c)/(f*x**2+e)**2,x)
 

Output:

Timed out
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \left (e+f x^2\right )^2} \, dx=\text {Exception raised: ValueError} \] Input:

integrate((b*x^2+a)/(d*x^2+c)/(f*x^2+e)^2,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(e>0)', see `assume?` for more de 
tails)Is e
 

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.08 \[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \left (e+f x^2\right )^2} \, dx=-\frac {{\left (b c d - a d^{2}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{{\left (d^{2} e^{2} - 2 \, c d e f + c^{2} f^{2}\right )} \sqrt {c d}} + \frac {{\left (b d e^{2} + b c e f - 3 \, a d e f + a c f^{2}\right )} \arctan \left (\frac {f x}{\sqrt {e f}}\right )}{2 \, {\left (d^{2} e^{3} - 2 \, c d e^{2} f + c^{2} e f^{2}\right )} \sqrt {e f}} + \frac {b e x - a f x}{2 \, {\left (d e^{2} - c e f\right )} {\left (f x^{2} + e\right )}} \] Input:

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

Output:

-(b*c*d - a*d^2)*arctan(d*x/sqrt(c*d))/((d^2*e^2 - 2*c*d*e*f + c^2*f^2)*sq 
rt(c*d)) + 1/2*(b*d*e^2 + b*c*e*f - 3*a*d*e*f + a*c*f^2)*arctan(f*x/sqrt(e 
*f))/((d^2*e^3 - 2*c*d*e^2*f + c^2*e*f^2)*sqrt(e*f)) + 1/2*(b*e*x - a*f*x) 
/((d*e^2 - c*e*f)*(f*x^2 + e))
 

Mupad [B] (verification not implemented)

Time = 4.00 (sec) , antiderivative size = 5567, normalized size of antiderivative = 39.76 \[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \left (e+f x^2\right )^2} \, dx=\text {Too large to display} \] Input:

int((a + b*x^2)/((c + d*x^2)*(e + f*x^2)^2),x)
 

Output:

(x*(a*f - b*e))/(2*e*(e + f*x^2)*(c*f - d*e)) - (atan(((((x*(b^2*d^5*e^4*f 
 + a^2*c^2*d^3*f^5 + 13*a^2*d^5*e^2*f^3 + 5*b^2*c^2*d^3*e^2*f^3 - 6*a*b*d^ 
5*e^3*f^2 - 6*a^2*c*d^4*e*f^4 + 2*b^2*c*d^4*e^3*f^2 - 12*a*b*c*d^4*e^2*f^3 
 + 2*a*b*c^2*d^3*e*f^4))/(2*(d^2*e^4 + c^2*e^2*f^2 - 2*c*d*e^3*f)) - ((-e^ 
3*f)^(1/2)*((18*a*c*d^6*e^5*f^3 - 4*a*d^7*e^6*f^2 + 2*a*c^5*d^2*e*f^7 + 2* 
b*c*d^6*e^6*f^2 - 32*a*c^2*d^5*e^4*f^4 + 28*a*c^3*d^4*e^3*f^5 - 12*a*c^4*d 
^3*e^2*f^6 - 8*b*c^2*d^5*e^5*f^3 + 12*b*c^3*d^4*e^4*f^4 - 8*b*c^4*d^3*e^3* 
f^5 + 2*b*c^5*d^2*e^2*f^6)/(d^3*e^5 - c^3*e^2*f^3 + 3*c^2*d*e^3*f^2 - 3*c* 
d^2*e^4*f) - (x*(-e^3*f)^(1/2)*(a*c*f^2 + b*d*e^2 - 3*a*d*e*f + b*c*e*f)*( 
16*d^7*e^7*f^2 - 48*c*d^6*e^6*f^3 + 32*c^2*d^5*e^5*f^4 + 32*c^3*d^4*e^4*f^ 
5 - 48*c^4*d^3*e^3*f^6 + 16*c^5*d^2*e^2*f^7))/(8*(d^2*e^5*f + c^2*e^3*f^3 
- 2*c*d*e^4*f^2)*(d^2*e^4 + c^2*e^2*f^2 - 2*c*d*e^3*f)))*(a*c*f^2 + b*d*e^ 
2 - 3*a*d*e*f + b*c*e*f))/(4*(d^2*e^5*f + c^2*e^3*f^3 - 2*c*d*e^4*f^2)))*( 
-e^3*f)^(1/2)*(a*c*f^2 + b*d*e^2 - 3*a*d*e*f + b*c*e*f)*1i)/(4*(d^2*e^5*f 
+ c^2*e^3*f^3 - 2*c*d*e^4*f^2)) + (((x*(b^2*d^5*e^4*f + a^2*c^2*d^3*f^5 + 
13*a^2*d^5*e^2*f^3 + 5*b^2*c^2*d^3*e^2*f^3 - 6*a*b*d^5*e^3*f^2 - 6*a^2*c*d 
^4*e*f^4 + 2*b^2*c*d^4*e^3*f^2 - 12*a*b*c*d^4*e^2*f^3 + 2*a*b*c^2*d^3*e*f^ 
4))/(2*(d^2*e^4 + c^2*e^2*f^2 - 2*c*d*e^3*f)) + ((-e^3*f)^(1/2)*((18*a*c*d 
^6*e^5*f^3 - 4*a*d^7*e^6*f^2 + 2*a*c^5*d^2*e*f^7 + 2*b*c*d^6*e^6*f^2 - 32* 
a*c^2*d^5*e^4*f^4 + 28*a*c^3*d^4*e^3*f^5 - 12*a*c^4*d^3*e^2*f^6 - 8*b*c...
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 428, normalized size of antiderivative = 3.06 \[ \int \frac {a+b x^2}{\left (c+d x^2\right ) \left (e+f x^2\right )^2} \, dx=\frac {2 \sqrt {d}\, \sqrt {c}\, \mathit {atan} \left (\frac {d x}{\sqrt {d}\, \sqrt {c}}\right ) a d \,e^{3} f +2 \sqrt {d}\, \sqrt {c}\, \mathit {atan} \left (\frac {d x}{\sqrt {d}\, \sqrt {c}}\right ) a d \,e^{2} f^{2} x^{2}-2 \sqrt {d}\, \sqrt {c}\, \mathit {atan} \left (\frac {d x}{\sqrt {d}\, \sqrt {c}}\right ) b c \,e^{3} f -2 \sqrt {d}\, \sqrt {c}\, \mathit {atan} \left (\frac {d x}{\sqrt {d}\, \sqrt {c}}\right ) b c \,e^{2} f^{2} x^{2}+\sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) a \,c^{2} e \,f^{2}+\sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) a \,c^{2} f^{3} x^{2}-3 \sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) a c d \,e^{2} f -3 \sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) a c d e \,f^{2} x^{2}+\sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) b \,c^{2} e^{2} f +\sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) b \,c^{2} e \,f^{2} x^{2}+\sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) b c d \,e^{3}+\sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) b c d \,e^{2} f \,x^{2}+a \,c^{2} e \,f^{3} x -a c d \,e^{2} f^{2} x -b \,c^{2} e^{2} f^{2} x +b c d \,e^{3} f x}{2 c \,e^{2} f \left (c^{2} f^{3} x^{2}-2 c d e \,f^{2} x^{2}+d^{2} e^{2} f \,x^{2}+c^{2} e \,f^{2}-2 c d \,e^{2} f +d^{2} e^{3}\right )} \] Input:

int((b*x^2+a)/(d*x^2+c)/(f*x^2+e)^2,x)
 

Output:

(2*sqrt(d)*sqrt(c)*atan((d*x)/(sqrt(d)*sqrt(c)))*a*d*e**3*f + 2*sqrt(d)*sq 
rt(c)*atan((d*x)/(sqrt(d)*sqrt(c)))*a*d*e**2*f**2*x**2 - 2*sqrt(d)*sqrt(c) 
*atan((d*x)/(sqrt(d)*sqrt(c)))*b*c*e**3*f - 2*sqrt(d)*sqrt(c)*atan((d*x)/( 
sqrt(d)*sqrt(c)))*b*c*e**2*f**2*x**2 + sqrt(f)*sqrt(e)*atan((f*x)/(sqrt(f) 
*sqrt(e)))*a*c**2*e*f**2 + sqrt(f)*sqrt(e)*atan((f*x)/(sqrt(f)*sqrt(e)))*a 
*c**2*f**3*x**2 - 3*sqrt(f)*sqrt(e)*atan((f*x)/(sqrt(f)*sqrt(e)))*a*c*d*e* 
*2*f - 3*sqrt(f)*sqrt(e)*atan((f*x)/(sqrt(f)*sqrt(e)))*a*c*d*e*f**2*x**2 + 
 sqrt(f)*sqrt(e)*atan((f*x)/(sqrt(f)*sqrt(e)))*b*c**2*e**2*f + sqrt(f)*sqr 
t(e)*atan((f*x)/(sqrt(f)*sqrt(e)))*b*c**2*e*f**2*x**2 + sqrt(f)*sqrt(e)*at 
an((f*x)/(sqrt(f)*sqrt(e)))*b*c*d*e**3 + sqrt(f)*sqrt(e)*atan((f*x)/(sqrt( 
f)*sqrt(e)))*b*c*d*e**2*f*x**2 + a*c**2*e*f**3*x - a*c*d*e**2*f**2*x - b*c 
**2*e**2*f**2*x + b*c*d*e**3*f*x)/(2*c*e**2*f*(c**2*e*f**2 + c**2*f**3*x** 
2 - 2*c*d*e**2*f - 2*c*d*e*f**2*x**2 + d**2*e**3 + d**2*e**2*f*x**2))