Integrand size = 33, antiderivative size = 48 \[ \int \frac {a+b x+c x^2}{x \sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {c \sqrt {1-d^2 x^2}}{d^2}+\frac {b \arcsin (d x)}{d}-a \text {arctanh}\left (\sqrt {1-d^2 x^2}\right ) \] Output:
-c*(-d^2*x^2+1)^(1/2)/d^2+b*arcsin(d*x)/d-a*arctanh((-d^2*x^2+1)^(1/2))
Time = 0.18 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.52 \[ \int \frac {a+b x+c x^2}{x \sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {c \sqrt {1-d^2 x^2}}{d^2}+\frac {2 b \arctan \left (\frac {d x}{-1+\sqrt {1-d^2 x^2}}\right )}{d}-a \log (x)+a \log \left (-1+\sqrt {1-d^2 x^2}\right ) \] Input:
Integrate[(a + b*x + c*x^2)/(x*Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]
Output:
-((c*Sqrt[1 - d^2*x^2])/d^2) + (2*b*ArcTan[(d*x)/(-1 + Sqrt[1 - d^2*x^2])] )/d - a*Log[x] + a*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 = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {2112, 2340, 25, 27, 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 \sqrt {1-d x} \sqrt {d x+1}} \, dx\) |
\(\Big \downarrow \) 2112 |
\(\displaystyle \int \frac {a+b x+c x^2}{x \sqrt {1-d^2 x^2}}dx\) |
\(\Big \downarrow \) 2340 |
\(\displaystyle -\frac {\int -\frac {d^2 (a+b x)}{x \sqrt {1-d^2 x^2}}dx}{d^2}-\frac {c \sqrt {1-d^2 x^2}}{d^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {d^2 (a+b x)}{x \sqrt {1-d^2 x^2}}dx}{d^2}-\frac {c \sqrt {1-d^2 x^2}}{d^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \frac {a+b x}{x \sqrt {1-d^2 x^2}}dx-\frac {c \sqrt {1-d^2 x^2}}{d^2}\) |
\(\Big \downarrow \) 538 |
\(\displaystyle a \int \frac {1}{x \sqrt {1-d^2 x^2}}dx+b \int \frac {1}{\sqrt {1-d^2 x^2}}dx-\frac {c \sqrt {1-d^2 x^2}}{d^2}\) |
\(\Big \downarrow \) 223 |
\(\displaystyle a \int \frac {1}{x \sqrt {1-d^2 x^2}}dx+\frac {b \arcsin (d x)}{d}-\frac {c \sqrt {1-d^2 x^2}}{d^2}\) |
\(\Big \downarrow \) 243 |
\(\displaystyle \frac {1}{2} a \int \frac {1}{x^2 \sqrt {1-d^2 x^2}}dx^2+\frac {b \arcsin (d x)}{d}-\frac {c \sqrt {1-d^2 x^2}}{d^2}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle -\frac {a \int \frac {1}{\frac {1}{d^2}-\frac {x^4}{d^2}}d\sqrt {1-d^2 x^2}}{d^2}+\frac {b \arcsin (d x)}{d}-\frac {c \sqrt {1-d^2 x^2}}{d^2}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle -a \text {arctanh}\left (\sqrt {1-d^2 x^2}\right )+\frac {b \arcsin (d x)}{d}-\frac {c \sqrt {1-d^2 x^2}}{d^2}\) |
Input:
Int[(a + b*x + c*x^2)/(x*Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]
Output:
-((c*Sqrt[1 - d^2*x^2])/d^2) + (b*ArcSin[d*x])/d - a*ArcTanh[Sqrt[1 - d^2* x^2]]
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
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 = Expon[Pq, x], f = Coeff[Pq, x, Expon[Pq, x]]}, Simp[f*(c*x)^(m + q - 1 )*((a + b*x^2)^(p + 1)/(b*c^(q - 1)*(m + q + 2*p + 1))), x] + Simp[1/(b*(m + q + 2*p + 1)) Int[(c*x)^m*(a + b*x^2)^p*ExpandToSum[b*(m + q + 2*p + 1) *Pq - b*f*(m + q + 2*p + 1)*x^q - a*f*(m + q - 1)*x^(q - 2), x], x], x] /; GtQ[q, 1] && NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, b, c, m, p}, x] && PolyQ [Pq, x] && ( !IGtQ[m, 0] || IGtQ[p + 1/2, -1])
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.60 (sec) , antiderivative size = 96, normalized size of antiderivative = 2.00
method | result | size |
default | \(\frac {\sqrt {-x d +1}\, \sqrt {x d +1}\, \left (-\operatorname {csgn}\left (d \right ) \operatorname {arctanh}\left (\frac {1}{\sqrt {-d^{2} x^{2}+1}}\right ) a \,d^{2}-\sqrt {-d^{2} x^{2}+1}\, \operatorname {csgn}\left (d \right ) c +\arctan \left (\frac {\operatorname {csgn}\left (d \right ) d x}{\sqrt {-\left (x d +1\right ) \left (x d -1\right )}}\right ) b d \right ) \operatorname {csgn}\left (d \right )}{d^{2} \sqrt {-d^{2} x^{2}+1}}\) | \(96\) |
Input:
int((c*x^2+b*x+a)/x/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x,method=_RETURNVERBOSE)
Output:
(-d*x+1)^(1/2)*(d*x+1)^(1/2)/d^2*(-csgn(d)*arctanh(1/(-d^2*x^2+1)^(1/2))*a *d^2-(-d^2*x^2+1)^(1/2)*csgn(d)*c+arctan(csgn(d)*d*x/(-(d*x+1)*(d*x-1))^(1 /2))*b*d)*csgn(d)/(-d^2*x^2+1)^(1/2)
Time = 0.08 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.69 \[ \int \frac {a+b x+c x^2}{x \sqrt {1-d x} \sqrt {1+d x}} \, dx=\frac {a d^{2} \log \left (\frac {\sqrt {d x + 1} \sqrt {-d x + 1} - 1}{x}\right ) - 2 \, b d \arctan \left (\frac {\sqrt {d x + 1} \sqrt {-d x + 1} - 1}{d x}\right ) - \sqrt {d x + 1} \sqrt {-d x + 1} c}{d^{2}} \] Input:
integrate((c*x^2+b*x+a)/x/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="frica s")
Output:
(a*d^2*log((sqrt(d*x + 1)*sqrt(-d*x + 1) - 1)/x) - 2*b*d*arctan((sqrt(d*x + 1)*sqrt(-d*x + 1) - 1)/(d*x)) - sqrt(d*x + 1)*sqrt(-d*x + 1)*c)/d^2
Result contains complex when optimal does not.
Time = 28.62 (sec) , antiderivative size = 245, normalized size of antiderivative = 5.10 \[ \int \frac {a+b x+c x^2}{x \sqrt {1-d x} \sqrt {1+d x}} \, dx=\frac {i a {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 {a {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 b {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 {b {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} - \frac {i c {G_{6, 6}^{6, 2}\left (\begin {matrix} - \frac {1}{4}, \frac {1}{4} & 0, 0, \frac {1}{2}, 1 \\- \frac {1}{2}, - \frac {1}{4}, 0, \frac {1}{4}, \frac {1}{2}, 0 & \end {matrix} \middle | {\frac {1}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d^{2}} - \frac {c {G_{6, 6}^{2, 6}\left (\begin {matrix} -1, - \frac {3}{4}, - \frac {1}{2}, - \frac {1}{4}, 0, 1 & \\- \frac {3}{4}, - \frac {1}{4} & -1, - \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}} d^{2}} \] Input:
integrate((c*x**2+b*x+a)/x/(-d*x+1)**(1/2)/(d*x+1)**(1/2),x)
Output:
I*a*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)) - a*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*b*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) + b*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) - I*c*meijerg(((-1/4, 1/4), (0, 0, 1/2, 1)), ((-1/2, -1 /4, 0, 1/4, 1/2, 0), ()), 1/(d**2*x**2))/(4*pi**(3/2)*d**2) - c*meijerg((( -1, -3/4, -1/2, -1/4, 0, 1), ()), ((-3/4, -1/4), (-1, -1/2, -1/2, 0)), exp _polar(-2*I*pi)/(d**2*x**2))/(4*pi**(3/2)*d**2)
Time = 0.11 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.19 \[ \int \frac {a+b x+c x^2}{x \sqrt {1-d x} \sqrt {1+d x}} \, dx=-a \log \left (\frac {2 \, \sqrt {-d^{2} x^{2} + 1}}{{\left | x \right |}} + \frac {2}{{\left | x \right |}}\right ) + \frac {b \arcsin \left (d x\right )}{d} - \frac {\sqrt {-d^{2} x^{2} + 1} c}{d^{2}} \] Input:
integrate((c*x^2+b*x+a)/x/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="maxim a")
Output:
-a*log(2*sqrt(-d^2*x^2 + 1)/abs(x) + 2/abs(x)) + b*arcsin(d*x)/d - sqrt(-d ^2*x^2 + 1)*c/d^2
Leaf count of result is larger than twice the leaf count of optimal. 196 vs. \(2 (44) = 88\).
Time = 0.18 (sec) , antiderivative size = 196, normalized size of antiderivative = 4.08 \[ \int \frac {a+b x+c x^2}{x \sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {a d^{2} \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 ) - a d^{2} \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 )} b d + \sqrt {d x + 1} \sqrt {-d x + 1} c}{d^{2}} \] Input:
integrate((c*x^2+b*x+a)/x/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="giac" )
Output:
-(a*d^2*log(abs(-(sqrt(2) - sqrt(-d*x + 1))/sqrt(d*x + 1) + sqrt(d*x + 1)/ (sqrt(2) - sqrt(-d*x + 1)) + 2)) - a*d^2*log(abs(-(sqrt(2) - sqrt(-d*x + 1 ))/sqrt(d*x + 1) + sqrt(d*x + 1)/(sqrt(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)/(s qrt(2) - sqrt(-d*x + 1))))*b*d + sqrt(d*x + 1)*sqrt(-d*x + 1)*c)/d^2
Time = 4.80 (sec) , antiderivative size = 122, normalized size of antiderivative = 2.54 \[ \int \frac {a+b x+c x^2}{x \sqrt {1-d x} \sqrt {1+d x}} \, dx=a\,\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 {\sqrt {1-d\,x}\,\left (\frac {c}{d^2}+\frac {c\,x}{d}\right )}{\sqrt {d\,x+1}}-\frac {4\,b\,\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}} \] Input:
int((a + b*x + c*x^2)/(x*(1 - d*x)^(1/2)*(d*x + 1)^(1/2)),x)
Output:
a*(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))) - ((1 - d*x)^(1/2)*(c/d^2 + (c*x)/d) )/(d*x + 1)^(1/2) - (4*b*atan((d*((1 - d*x)^(1/2) - 1))/(((d*x + 1)^(1/2) - 1)*(d^2)^(1/2))))/(d^2)^(1/2)
Time = 0.15 (sec) , antiderivative size = 148, normalized size of antiderivative = 3.08 \[ \int \frac {a+b x+c x^2}{x \sqrt {1-d x} \sqrt {1+d x}} \, dx=\frac {-2 \mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right ) b d -\sqrt {d x +1}\, \sqrt {-d x +1}\, c -\mathrm {log}\left (-\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )-1\right ) a \,d^{2}+\mathrm {log}\left (-\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )+1\right ) a \,d^{2}-\mathrm {log}\left (\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )-1\right ) a \,d^{2}+\mathrm {log}\left (\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )+1\right ) a \,d^{2}}{d^{2}} \] Input:
int((c*x^2+b*x+a)/x/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x)
Output:
( - 2*asin(sqrt( - d*x + 1)/sqrt(2))*b*d - sqrt(d*x + 1)*sqrt( - d*x + 1)* c - log( - sqrt(2) + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) - 1)*a*d**2 + l og( - sqrt(2) + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) + 1)*a*d**2 - log(sq rt(2) + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) - 1)*a*d**2 + log(sqrt(2) + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) + 1)*a*d**2)/d**2