Integrand size = 33, antiderivative size = 48 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {a \sqrt {1-d^2 x^2}}{x}+\frac {c \arcsin (d x)}{d}-b \text {arctanh}\left (\sqrt {1-d^2 x^2}\right ) \] Output:
-a*(-d^2*x^2+1)^(1/2)/x+c*arcsin(d*x)/d-b*arctanh((-d^2*x^2+1)^(1/2))
Time = 0.20 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.52 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {a \sqrt {1-d^2 x^2}}{x}+\frac {2 c \arctan \left (\frac {d x}{-1+\sqrt {1-d^2 x^2}}\right )}{d}-b \log (x)+b \log \left (-1+\sqrt {1-d^2 x^2}\right ) \] Input:
Integrate[(a + b*x + c*x^2)/(x^2*Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]
Output:
-((a*Sqrt[1 - d^2*x^2])/x) + (2*c*ArcTan[(d*x)/(-1 + Sqrt[1 - d^2*x^2])])/ d - b*Log[x] + b*Log[-1 + Sqrt[1 - d^2*x^2]]
Time = 0.38 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.242, Rules used = {2112, 2338, 25, 538, 223, 243, 73, 221}
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+c x^2}{x^2 \sqrt {1-d x} \sqrt {d x+1}} \, dx\) |
\(\Big \downarrow \) 2112 |
\(\displaystyle \int \frac {a+b x+c x^2}{x^2 \sqrt {1-d^2 x^2}}dx\) |
\(\Big \downarrow \) 2338 |
\(\displaystyle -\int -\frac {b+c x}{x \sqrt {1-d^2 x^2}}dx-\frac {a \sqrt {1-d^2 x^2}}{x}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int \frac {b+c x}{x \sqrt {1-d^2 x^2}}dx-\frac {a \sqrt {1-d^2 x^2}}{x}\) |
\(\Big \downarrow \) 538 |
\(\displaystyle b \int \frac {1}{x \sqrt {1-d^2 x^2}}dx+c \int \frac {1}{\sqrt {1-d^2 x^2}}dx-\frac {a \sqrt {1-d^2 x^2}}{x}\) |
\(\Big \downarrow \) 223 |
\(\displaystyle b \int \frac {1}{x \sqrt {1-d^2 x^2}}dx-\frac {a \sqrt {1-d^2 x^2}}{x}+\frac {c \arcsin (d x)}{d}\) |
\(\Big \downarrow \) 243 |
\(\displaystyle \frac {1}{2} b \int \frac {1}{x^2 \sqrt {1-d^2 x^2}}dx^2-\frac {a \sqrt {1-d^2 x^2}}{x}+\frac {c \arcsin (d x)}{d}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle -\frac {b \int \frac {1}{\frac {1}{d^2}-\frac {x^4}{d^2}}d\sqrt {1-d^2 x^2}}{d^2}-\frac {a \sqrt {1-d^2 x^2}}{x}+\frac {c \arcsin (d x)}{d}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle -\frac {a \sqrt {1-d^2 x^2}}{x}+\frac {c \arcsin (d x)}{d}-b \text {arctanh}\left (\sqrt {1-d^2 x^2}\right )\) |
Input:
Int[(a + b*x + c*x^2)/(x^2*Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]
Output:
-((a*Sqrt[1 - d^2*x^2])/x) + (c*ArcSin[d*x])/d - b*ArcTanh[Sqrt[1 - d^2*x^ 2]]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, x]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt [a])]/Rt[-b, 2], x] /; FreeQ[{a, b}, x] && GtQ[a, 0] && NegQ[b]
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[1/2 Subst[In t[x^((m - 1)/2)*(a + b*x)^p, x], x, x^2], x] /; FreeQ[{a, b, m, p}, x] && I ntegerQ[(m - 1)/2]
Int[((c_) + (d_.)*(x_))/((x_)*Sqrt[(a_) + (b_.)*(x_)^2]), x_Symbol] :> Simp [c Int[1/(x*Sqrt[a + b*x^2]), x], x] + Simp[d Int[1/Sqrt[a + b*x^2], x] , x] /; FreeQ[{a, b, c, d}, x]
Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f _.)*(x_))^(p_.), x_Symbol] :> Int[Px*(a*c + b*d*x^2)^m*(e + f*x)^p, x] /; F reeQ[{a, b, c, d, e, f, m, n, p}, x] && PolyQ[Px, x] && EqQ[b*c + a*d, 0] & & EqQ[m, n] && (IntegerQ[m] || (GtQ[a, 0] && GtQ[c, 0]))
Int[(Pq_)*((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{ Q = PolynomialQuotient[Pq, c*x, x], R = PolynomialRemainder[Pq, c*x, x]}, S imp[R*(c*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*c*(m + 1))), x] + Simp[1/(a*c*( m + 1)) Int[(c*x)^(m + 1)*(a + b*x^2)^p*ExpandToSum[a*c*(m + 1)*Q - b*R*( m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && Lt Q[m, -1] && (IntegerQ[2*p] || NeQ[Expon[Pq, x], 1])
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.68 (sec) , antiderivative size = 97, normalized size of antiderivative = 2.02
method | result | size |
default | \(\frac {\left (-\operatorname {csgn}\left (d \right ) d \,\operatorname {arctanh}\left (\frac {1}{\sqrt {-d^{2} x^{2}+1}}\right ) b x -\sqrt {-d^{2} x^{2}+1}\, \operatorname {csgn}\left (d \right ) d a +\arctan \left (\frac {\operatorname {csgn}\left (d \right ) d x}{\sqrt {-d^{2} x^{2}+1}}\right ) c x \right ) \sqrt {-x d +1}\, \sqrt {x d +1}\, \operatorname {csgn}\left (d \right )}{\sqrt {-d^{2} x^{2}+1}\, x d}\) | \(97\) |
risch | \(\frac {a \sqrt {x d +1}\, \left (x d -1\right ) \sqrt {\left (-x d +1\right ) \left (x d +1\right )}}{x \sqrt {-\left (x d +1\right ) \left (x d -1\right )}\, \sqrt {-x d +1}}+\frac {\left (\frac {c \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+1}}\right )}{\sqrt {d^{2}}}-b \,\operatorname {arctanh}\left (\frac {1}{\sqrt {-d^{2} x^{2}+1}}\right )\right ) \sqrt {\left (-x d +1\right ) \left (x d +1\right )}}{\sqrt {-x d +1}\, \sqrt {x d +1}}\) | \(129\) |
Input:
int((c*x^2+b*x+a)/x^2/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x,method=_RETURNVERBOSE )
Output:
(-csgn(d)*d*arctanh(1/(-d^2*x^2+1)^(1/2))*b*x-(-d^2*x^2+1)^(1/2)*csgn(d)*d *a+arctan(csgn(d)*d*x/(-d^2*x^2+1)^(1/2))*c*x)*(-d*x+1)^(1/2)*(d*x+1)^(1/2 )*csgn(d)/(-d^2*x^2+1)^(1/2)/x/d
Time = 0.08 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.75 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {1-d x} \sqrt {1+d x}} \, dx=\frac {b d x \log \left (\frac {\sqrt {d x + 1} \sqrt {-d x + 1} - 1}{x}\right ) - \sqrt {d x + 1} \sqrt {-d x + 1} a d - 2 \, c x \arctan \left (\frac {\sqrt {d x + 1} \sqrt {-d x + 1} - 1}{d x}\right )}{d x} \] Input:
integrate((c*x^2+b*x+a)/x^2/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="fri cas")
Output:
(b*d*x*log((sqrt(d*x + 1)*sqrt(-d*x + 1) - 1)/x) - sqrt(d*x + 1)*sqrt(-d*x + 1)*a*d - 2*c*x*arctan((sqrt(d*x + 1)*sqrt(-d*x + 1) - 1)/(d*x)))/(d*x)
Result contains complex when optimal does not.
Time = 28.37 (sec) , antiderivative size = 221, normalized size of antiderivative = 4.60 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {1-d x} \sqrt {1+d x}} \, dx=\frac {i a d {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {5}{4}, \frac {7}{4}, 1 & \frac {3}{2}, \frac {3}{2}, 2 \\1, \frac {5}{4}, \frac {3}{2}, \frac {7}{4}, 2 & 0 \end {matrix} \middle | {\frac {1}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} + \frac {a d {G_{6, 6}^{2, 6}\left (\begin {matrix} \frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2}, 1 & \\\frac {3}{4}, \frac {5}{4} & \frac {1}{2}, 1, 1, 0 \end {matrix} \middle | {\frac {e^{- 2 i \pi }}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} + \frac {i b {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {3}{4}, \frac {5}{4}, 1 & 1, 1, \frac {3}{2} \\\frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2} & 0 \end {matrix} \middle | {\frac {1}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} - \frac {b {G_{6, 6}^{2, 6}\left (\begin {matrix} 0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 1 & \\\frac {1}{4}, \frac {3}{4} & 0, \frac {1}{2}, \frac {1}{2}, 0 \end {matrix} \middle | {\frac {e^{- 2 i \pi }}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} - \frac {i c {G_{6, 6}^{6, 2}\left (\begin {matrix} \frac {1}{4}, \frac {3}{4} & \frac {1}{2}, \frac {1}{2}, 1, 1 \\0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 0 & \end {matrix} \middle | {\frac {1}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d} + \frac {c {G_{6, 6}^{2, 6}\left (\begin {matrix} - \frac {1}{2}, - \frac {1}{4}, 0, \frac {1}{4}, \frac {1}{2}, 1 & \\- \frac {1}{4}, \frac {1}{4} & - \frac {1}{2}, 0, 0, 0 \end {matrix} \middle | {\frac {e^{- 2 i \pi }}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d} \] Input:
integrate((c*x**2+b*x+a)/x**2/(-d*x+1)**(1/2)/(d*x+1)**(1/2),x)
Output:
I*a*d*meijerg(((5/4, 7/4, 1), (3/2, 3/2, 2)), ((1, 5/4, 3/2, 7/4, 2), (0,) ), 1/(d**2*x**2))/(4*pi**(3/2)) + a*d*meijerg(((1/2, 3/4, 1, 5/4, 3/2, 1), ()), ((3/4, 5/4), (1/2, 1, 1, 0)), exp_polar(-2*I*pi)/(d**2*x**2))/(4*pi* *(3/2)) + I*b*meijerg(((3/4, 5/4, 1), (1, 1, 3/2)), ((1/2, 3/4, 1, 5/4, 3/ 2), (0,)), 1/(d**2*x**2))/(4*pi**(3/2)) - b*meijerg(((0, 1/4, 1/2, 3/4, 1, 1), ()), ((1/4, 3/4), (0, 1/2, 1/2, 0)), exp_polar(-2*I*pi)/(d**2*x**2))/ (4*pi**(3/2)) - I*c*meijerg(((1/4, 3/4), (1/2, 1/2, 1, 1)), ((0, 1/4, 1/2, 3/4, 1, 0), ()), 1/(d**2*x**2))/(4*pi**(3/2)*d) + c*meijerg(((-1/2, -1/4, 0, 1/4, 1/2, 1), ()), ((-1/4, 1/4), (-1/2, 0, 0, 0)), exp_polar(-2*I*pi)/ (d**2*x**2))/(4*pi**(3/2)*d)
Time = 0.11 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.19 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {1-d x} \sqrt {1+d x}} \, dx=-b \log \left (\frac {2 \, \sqrt {-d^{2} x^{2} + 1}}{{\left | x \right |}} + \frac {2}{{\left | x \right |}}\right ) + \frac {c \arcsin \left (d x\right )}{d} - \frac {\sqrt {-d^{2} x^{2} + 1} a}{x} \] Input:
integrate((c*x^2+b*x+a)/x^2/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="max ima")
Output:
-b*log(2*sqrt(-d^2*x^2 + 1)/abs(x) + 2/abs(x)) + c*arcsin(d*x)/d - sqrt(-d ^2*x^2 + 1)*a/x
Leaf count of result is larger than twice the leaf count of optimal. 282 vs. \(2 (44) = 88\).
Time = 0.21 (sec) , antiderivative size = 282, normalized size of antiderivative = 5.88 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {\frac {4 \, a d^{2} {\left (\frac {\sqrt {2} - \sqrt {-d x + 1}}{\sqrt {d x + 1}} - \frac {\sqrt {d x + 1}}{\sqrt {2} - \sqrt {-d x + 1}}\right )}}{{\left (\frac {\sqrt {2} - \sqrt {-d x + 1}}{\sqrt {d x + 1}} - \frac {\sqrt {d x + 1}}{\sqrt {2} - \sqrt {-d x + 1}}\right )}^{2} - 4} + b d \log \left ({\left | -\frac {\sqrt {2} - \sqrt {-d x + 1}}{\sqrt {d x + 1}} + \frac {\sqrt {d x + 1}}{\sqrt {2} - \sqrt {-d x + 1}} + 2 \right |}\right ) - b d \log \left ({\left | -\frac {\sqrt {2} - \sqrt {-d x + 1}}{\sqrt {d x + 1}} + \frac {\sqrt {d x + 1}}{\sqrt {2} - \sqrt {-d x + 1}} - 2 \right |}\right ) - {\left (\pi + 2 \, \arctan \left (\frac {\sqrt {d x + 1} {\left (\frac {{\left (\sqrt {2} - \sqrt {-d x + 1}\right )}^{2}}{d x + 1} - 1\right )}}{2 \, {\left (\sqrt {2} - \sqrt {-d x + 1}\right )}}\right )\right )} c}{d} \] Input:
integrate((c*x^2+b*x+a)/x^2/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="gia c")
Output:
-(4*a*d^2*((sqrt(2) - sqrt(-d*x + 1))/sqrt(d*x + 1) - sqrt(d*x + 1)/(sqrt( 2) - sqrt(-d*x + 1)))/(((sqrt(2) - sqrt(-d*x + 1))/sqrt(d*x + 1) - sqrt(d* x + 1)/(sqrt(2) - sqrt(-d*x + 1)))^2 - 4) + b*d*log(abs(-(sqrt(2) - sqrt(- d*x + 1))/sqrt(d*x + 1) + sqrt(d*x + 1)/(sqrt(2) - sqrt(-d*x + 1)) + 2)) - b*d*log(abs(-(sqrt(2) - sqrt(-d*x + 1))/sqrt(d*x + 1) + sqrt(d*x + 1)/(sq rt(2) - sqrt(-d*x + 1)) - 2)) - (pi + 2*arctan(1/2*sqrt(d*x + 1)*((sqrt(2) - sqrt(-d*x + 1))^2/(d*x + 1) - 1)/(sqrt(2) - sqrt(-d*x + 1))))*c)/d
Time = 4.53 (sec) , antiderivative size = 114, normalized size of antiderivative = 2.38 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {1-d x} \sqrt {1+d x}} \, dx=b\,\left (\ln \left (\frac {{\left (\sqrt {1-d\,x}-1\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}-1\right )-\ln \left (\frac {\sqrt {1-d\,x}-1}{\sqrt {d\,x+1}-1}\right )\right )-\frac {4\,c\,\mathrm {atan}\left (\frac {d\,\left (\sqrt {1-d\,x}-1\right )}{\left (\sqrt {d\,x+1}-1\right )\,\sqrt {d^2}}\right )}{\sqrt {d^2}}-\frac {a\,\sqrt {1-d\,x}\,\sqrt {d\,x+1}}{x} \] Input:
int((a + b*x + c*x^2)/(x^2*(1 - d*x)^(1/2)*(d*x + 1)^(1/2)),x)
Output:
b*(log(((1 - d*x)^(1/2) - 1)^2/((d*x + 1)^(1/2) - 1)^2 - 1) - log(((1 - d* x)^(1/2) - 1)/((d*x + 1)^(1/2) - 1))) - (4*c*atan((d*((1 - d*x)^(1/2) - 1) )/(((d*x + 1)^(1/2) - 1)*(d^2)^(1/2))))/(d^2)^(1/2) - (a*(1 - d*x)^(1/2)*( d*x + 1)^(1/2))/x
Time = 0.15 (sec) , antiderivative size = 148, normalized size of antiderivative = 3.08 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {1-d x} \sqrt {1+d x}} \, dx=\frac {-2 \mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right ) c x -\sqrt {d x +1}\, \sqrt {-d x +1}\, a d -\mathrm {log}\left (-\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )-1\right ) b d x +\mathrm {log}\left (-\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )+1\right ) b d x -\mathrm {log}\left (\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )-1\right ) b d x +\mathrm {log}\left (\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )+1\right ) b d x}{d x} \] Input:
int((c*x^2+b*x+a)/x^2/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x)
Output:
( - 2*asin(sqrt( - d*x + 1)/sqrt(2))*c*x - sqrt(d*x + 1)*sqrt( - d*x + 1)* a*d - log( - sqrt(2) + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) - 1)*b*d*x + log( - sqrt(2) + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) + 1)*b*d*x - log(sq rt(2) + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) - 1)*b*d*x + log(sqrt(2) + t an(asin(sqrt( - d*x + 1)/sqrt(2))/2) + 1)*b*d*x)/(d*x)