Integrand size = 24, antiderivative size = 63 \[ \int \frac {x (1+a x)}{\sqrt {a x} \sqrt {1-a x}} \, dx=-\frac {7 \sqrt {a x} \sqrt {1-a x}}{4 a^2}-\frac {(a x)^{3/2} \sqrt {1-a x}}{2 a^2}-\frac {7 \arcsin (1-2 a x)}{8 a^2} \] Output:
-7/4*(a*x)^(1/2)*(-a*x+1)^(1/2)/a^2-1/2*(a*x)^(3/2)*(-a*x+1)^(1/2)/a^2+7/8 *arcsin(2*a*x-1)/a^2
Time = 0.28 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.38 \[ \int \frac {x (1+a x)}{\sqrt {a x} \sqrt {1-a x}} \, dx=\frac {\sqrt {a} x \left (-7+5 a x+2 a^2 x^2\right )+14 \sqrt {x} \sqrt {1-a x} \arctan \left (\frac {\sqrt {a} \sqrt {x}}{-1+\sqrt {1-a x}}\right )}{4 a^{3/2} \sqrt {-a x (-1+a x)}} \] Input:
Integrate[(x*(1 + a*x))/(Sqrt[a*x]*Sqrt[1 - a*x]),x]
Output:
(Sqrt[a]*x*(-7 + 5*a*x + 2*a^2*x^2) + 14*Sqrt[x]*Sqrt[1 - a*x]*ArcTan[(Sqr t[a]*Sqrt[x])/(-1 + Sqrt[1 - a*x])])/(4*a^(3/2)*Sqrt[-(a*x*(-1 + a*x))])
Time = 0.31 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.21, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {8, 90, 60, 62, 1090, 223}
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 {x (a x+1)}{\sqrt {a x} \sqrt {1-a x}} \, dx\) |
\(\Big \downarrow \) 8 |
\(\displaystyle \frac {\int \frac {\sqrt {a x} (a x+1)}{\sqrt {1-a x}}dx}{a}\) |
\(\Big \downarrow \) 90 |
\(\displaystyle \frac {\frac {7}{4} \int \frac {\sqrt {a x}}{\sqrt {1-a x}}dx-\frac {(a x)^{3/2} \sqrt {1-a x}}{2 a}}{a}\) |
\(\Big \downarrow \) 60 |
\(\displaystyle \frac {\frac {7}{4} \left (\frac {1}{2} \int \frac {1}{\sqrt {a x} \sqrt {1-a x}}dx-\frac {\sqrt {a x} \sqrt {1-a x}}{a}\right )-\frac {(a x)^{3/2} \sqrt {1-a x}}{2 a}}{a}\) |
\(\Big \downarrow \) 62 |
\(\displaystyle \frac {\frac {7}{4} \left (\frac {1}{2} \int \frac {1}{\sqrt {a x-a^2 x^2}}dx-\frac {\sqrt {a x} \sqrt {1-a x}}{a}\right )-\frac {(a x)^{3/2} \sqrt {1-a x}}{2 a}}{a}\) |
\(\Big \downarrow \) 1090 |
\(\displaystyle \frac {\frac {7}{4} \left (-\frac {\int \frac {1}{\sqrt {1-\frac {\left (a-2 a^2 x\right )^2}{a^2}}}d\left (a-2 a^2 x\right )}{2 a^2}-\frac {\sqrt {a x} \sqrt {1-a x}}{a}\right )-\frac {(a x)^{3/2} \sqrt {1-a x}}{2 a}}{a}\) |
\(\Big \downarrow \) 223 |
\(\displaystyle \frac {\frac {7}{4} \left (-\frac {\arcsin \left (\frac {a-2 a^2 x}{a}\right )}{2 a}-\frac {\sqrt {a x} \sqrt {1-a x}}{a}\right )-\frac {(a x)^{3/2} \sqrt {1-a x}}{2 a}}{a}\) |
Input:
Int[(x*(1 + a*x))/(Sqrt[a*x]*Sqrt[1 - a*x]),x]
Output:
(-1/2*((a*x)^(3/2)*Sqrt[1 - a*x])/a + (7*(-((Sqrt[a*x]*Sqrt[1 - a*x])/a) - ArcSin[(a - 2*a^2*x)/a]/(2*a)))/4)/a
Int[(u_.)*(x_)^(m_.)*((a_.)*(x_))^(p_), x_Symbol] :> Simp[1/a^m Int[u*(a* x)^(m + p), x], x] /; FreeQ[{a, m, p}, x] && IntegerQ[m]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ (a + b*x)^(m + 1)*((c + d*x)^n/(b*(m + n + 1))), x] + Simp[n*((b*c - a*d)/( b*(m + n + 1))) Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d}, x] && GtQ[n, 0] && NeQ[m + n + 1, 0] && !(IGtQ[m, 0] && ( !Integer Q[n] || (GtQ[m, 0] && LtQ[m - n, 0]))) && !ILtQ[m + n + 2, 0] && IntLinear Q[a, b, c, d, m, n, x]
Int[1/(Sqrt[(a_.) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Int[ 1/Sqrt[a*c - b*(a - c)*x - b^2*x^2], x] /; FreeQ[{a, b, c, d}, x] && EqQ[b + d, 0] && GtQ[a + c, 0]
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p _.), x_] :> Simp[b*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), x] + Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(d*f*(n + p + 2)) Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2, 0]
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[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[1/(2*c*(-4* (c/(b^2 - 4*a*c)))^p) Subst[Int[Simp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.24 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.43
method | result | size |
default | \(-\frac {\sqrt {-x a +1}\, x \left (4 \,\operatorname {csgn}\left (a \right ) \sqrt {-x \left (x a -1\right ) a}\, a x +14 \,\operatorname {csgn}\left (a \right ) \sqrt {-x \left (x a -1\right ) a}-7 \arctan \left (\frac {\operatorname {csgn}\left (a \right ) \left (2 x a -1\right )}{2 \sqrt {-x \left (x a -1\right ) a}}\right )\right ) \operatorname {csgn}\left (a \right )}{8 a \sqrt {x a}\, \sqrt {-x \left (x a -1\right ) a}}\) | \(90\) |
risch | \(\frac {\left (2 x a +7\right ) x \left (x a -1\right ) \sqrt {x a \left (-x a +1\right )}}{4 a \sqrt {-x \left (x a -1\right ) a}\, \sqrt {x a}\, \sqrt {-x a +1}}+\frac {7 \arctan \left (\frac {\sqrt {a^{2}}\, \left (x -\frac {1}{2 a}\right )}{\sqrt {-a^{2} x^{2}+x a}}\right ) \sqrt {x a \left (-x a +1\right )}}{8 a \sqrt {a^{2}}\, \sqrt {x a}\, \sqrt {-x a +1}}\) | \(116\) |
meijerg | \(-\frac {\sqrt {x}\, \left (-\frac {\sqrt {\pi }\, \sqrt {x}\, \left (-a \right )^{\frac {5}{2}} \left (10 x a +15\right ) \sqrt {-x a +1}}{20 a^{2}}+\frac {3 \sqrt {\pi }\, \left (-a \right )^{\frac {5}{2}} \arcsin \left (\sqrt {x}\, \sqrt {a}\right )}{4 a^{\frac {5}{2}}}\right )}{\left (-a \right )^{\frac {3}{2}} \sqrt {x a}\, \sqrt {\pi }}-\frac {\sqrt {x}\, \left (-\frac {\sqrt {\pi }\, \sqrt {x}\, \left (-a \right )^{\frac {3}{2}} \sqrt {-x a +1}}{a}+\frac {\sqrt {\pi }\, \left (-a \right )^{\frac {3}{2}} \arcsin \left (\sqrt {x}\, \sqrt {a}\right )}{a^{\frac {3}{2}}}\right )}{\sqrt {-a}\, \sqrt {x a}\, \sqrt {\pi }\, a}\) | \(138\) |
Input:
int(x*(a*x+1)/(x*a)^(1/2)/(-a*x+1)^(1/2),x,method=_RETURNVERBOSE)
Output:
-1/8*(-a*x+1)^(1/2)*x/a*(4*csgn(a)*(-x*(a*x-1)*a)^(1/2)*a*x+14*csgn(a)*(-x *(a*x-1)*a)^(1/2)-7*arctan(1/2*csgn(a)*(2*a*x-1)/(-x*(a*x-1)*a)^(1/2)))*cs gn(a)/(x*a)^(1/2)/(-x*(a*x-1)*a)^(1/2)
Time = 0.11 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.79 \[ \int \frac {x (1+a x)}{\sqrt {a x} \sqrt {1-a x}} \, dx=-\frac {{\left (2 \, a x + 7\right )} \sqrt {a x} \sqrt {-a x + 1} + 7 \, \arctan \left (\frac {\sqrt {a x} \sqrt {-a x + 1}}{a x - 1}\right )}{4 \, a^{2}} \] Input:
integrate(x*(a*x+1)/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="fricas")
Output:
-1/4*((2*a*x + 7)*sqrt(a*x)*sqrt(-a*x + 1) + 7*arctan(sqrt(a*x)*sqrt(-a*x + 1)/(a*x - 1)))/a^2
Result contains complex when optimal does not.
Time = 5.15 (sec) , antiderivative size = 269, normalized size of antiderivative = 4.27 \[ \int \frac {x (1+a x)}{\sqrt {a x} \sqrt {1-a x}} \, dx=a \left (\begin {cases} - \frac {3 i \operatorname {acosh}{\left (\sqrt {a} \sqrt {x} \right )}}{4 a^{3}} - \frac {i x^{\frac {5}{2}}}{2 \sqrt {a} \sqrt {a x - 1}} - \frac {i x^{\frac {3}{2}}}{4 a^{\frac {3}{2}} \sqrt {a x - 1}} + \frac {3 i \sqrt {x}}{4 a^{\frac {5}{2}} \sqrt {a x - 1}} & \text {for}\: \left |{a x}\right | > 1 \\\frac {3 \operatorname {asin}{\left (\sqrt {a} \sqrt {x} \right )}}{4 a^{3}} + \frac {x^{\frac {5}{2}}}{2 \sqrt {a} \sqrt {- a x + 1}} + \frac {x^{\frac {3}{2}}}{4 a^{\frac {3}{2}} \sqrt {- a x + 1}} - \frac {3 \sqrt {x}}{4 a^{\frac {5}{2}} \sqrt {- a x + 1}} & \text {otherwise} \end {cases}\right ) + \begin {cases} - \frac {i \operatorname {acosh}{\left (\sqrt {a} \sqrt {x} \right )}}{a^{2}} - \frac {i \sqrt {x} \sqrt {a x - 1}}{a^{\frac {3}{2}}} & \text {for}\: \left |{a x}\right | > 1 \\\frac {\operatorname {asin}{\left (\sqrt {a} \sqrt {x} \right )}}{a^{2}} + \frac {x^{\frac {3}{2}}}{\sqrt {a} \sqrt {- a x + 1}} - \frac {\sqrt {x}}{a^{\frac {3}{2}} \sqrt {- a x + 1}} & \text {otherwise} \end {cases} \] Input:
integrate(x*(a*x+1)/(a*x)**(1/2)/(-a*x+1)**(1/2),x)
Output:
a*Piecewise((-3*I*acosh(sqrt(a)*sqrt(x))/(4*a**3) - I*x**(5/2)/(2*sqrt(a)* sqrt(a*x - 1)) - I*x**(3/2)/(4*a**(3/2)*sqrt(a*x - 1)) + 3*I*sqrt(x)/(4*a* *(5/2)*sqrt(a*x - 1)), Abs(a*x) > 1), (3*asin(sqrt(a)*sqrt(x))/(4*a**3) + x**(5/2)/(2*sqrt(a)*sqrt(-a*x + 1)) + x**(3/2)/(4*a**(3/2)*sqrt(-a*x + 1)) - 3*sqrt(x)/(4*a**(5/2)*sqrt(-a*x + 1)), True)) + Piecewise((-I*acosh(sqr t(a)*sqrt(x))/a**2 - I*sqrt(x)*sqrt(a*x - 1)/a**(3/2), Abs(a*x) > 1), (asi n(sqrt(a)*sqrt(x))/a**2 + x**(3/2)/(sqrt(a)*sqrt(-a*x + 1)) - sqrt(x)/(a** (3/2)*sqrt(-a*x + 1)), True))
Time = 0.11 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.97 \[ \int \frac {x (1+a x)}{\sqrt {a x} \sqrt {1-a x}} \, dx=-\frac {\sqrt {-a^{2} x^{2} + a x} x}{2 \, a} - \frac {7 \, \arcsin \left (-\frac {2 \, a^{2} x - a}{a}\right )}{8 \, a^{2}} - \frac {7 \, \sqrt {-a^{2} x^{2} + a x}}{4 \, a^{2}} \] Input:
integrate(x*(a*x+1)/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="maxima")
Output:
-1/2*sqrt(-a^2*x^2 + a*x)*x/a - 7/8*arcsin(-(2*a^2*x - a)/a)/a^2 - 7/4*sqr t(-a^2*x^2 + a*x)/a^2
Time = 0.13 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.54 \[ \int \frac {x (1+a x)}{\sqrt {a x} \sqrt {1-a x}} \, dx=-\frac {{\left (2 \, a x + 7\right )} \sqrt {a x} \sqrt {-a x + 1} - 7 \, \arcsin \left (\sqrt {a x}\right )}{4 \, a^{2}} \] Input:
integrate(x*(a*x+1)/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="giac")
Output:
-1/4*((2*a*x + 7)*sqrt(a*x)*sqrt(-a*x + 1) - 7*arcsin(sqrt(a*x)))/a^2
Time = 24.24 (sec) , antiderivative size = 191, normalized size of antiderivative = 3.03 \[ \int \frac {x (1+a x)}{\sqrt {a x} \sqrt {1-a x}} \, dx=\frac {7\,\mathrm {atan}\left (\frac {\sqrt {a\,x}}{\sqrt {1-a\,x}-1}\right )}{2\,a^2}-\frac {\frac {2\,\sqrt {a\,x}}{\sqrt {1-a\,x}-1}-\frac {2\,{\left (a\,x\right )}^{3/2}}{{\left (\sqrt {1-a\,x}-1\right )}^3}}{a^2\,{\left (\frac {a\,x}{{\left (\sqrt {1-a\,x}-1\right )}^2}+1\right )}^2}-\frac {\frac {3\,\sqrt {a\,x}}{2\,\left (\sqrt {1-a\,x}-1\right )}+\frac {11\,{\left (a\,x\right )}^{3/2}}{2\,{\left (\sqrt {1-a\,x}-1\right )}^3}-\frac {11\,{\left (a\,x\right )}^{5/2}}{2\,{\left (\sqrt {1-a\,x}-1\right )}^5}-\frac {3\,{\left (a\,x\right )}^{7/2}}{2\,{\left (\sqrt {1-a\,x}-1\right )}^7}}{a^2\,{\left (\frac {a\,x}{{\left (\sqrt {1-a\,x}-1\right )}^2}+1\right )}^4} \] Input:
int((x*(a*x + 1))/((a*x)^(1/2)*(1 - a*x)^(1/2)),x)
Output:
(7*atan((a*x)^(1/2)/((1 - a*x)^(1/2) - 1)))/(2*a^2) - ((2*(a*x)^(1/2))/((1 - a*x)^(1/2) - 1) - (2*(a*x)^(3/2))/((1 - a*x)^(1/2) - 1)^3)/(a^2*((a*x)/ ((1 - a*x)^(1/2) - 1)^2 + 1)^2) - ((3*(a*x)^(1/2))/(2*((1 - a*x)^(1/2) - 1 )) + (11*(a*x)^(3/2))/(2*((1 - a*x)^(1/2) - 1)^3) - (11*(a*x)^(5/2))/(2*(( 1 - a*x)^(1/2) - 1)^5) - (3*(a*x)^(7/2))/(2*((1 - a*x)^(1/2) - 1)^7))/(a^2 *((a*x)/((1 - a*x)^(1/2) - 1)^2 + 1)^4)
Time = 0.14 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.83 \[ \int \frac {x (1+a x)}{\sqrt {a x} \sqrt {1-a x}} \, dx=\frac {-2 \sqrt {x}\, \sqrt {a}\, \sqrt {-a x +1}\, a x -7 \sqrt {x}\, \sqrt {a}\, \sqrt {-a x +1}-7 \,\mathrm {log}\left (\sqrt {-a x +1}+\sqrt {x}\, \sqrt {a}\, i \right ) i}{4 a^{2}} \] Input:
int(x*(a*x+1)/(a*x)^(1/2)/(-a*x+1)^(1/2),x)
Output:
( - 2*sqrt(x)*sqrt(a)*sqrt( - a*x + 1)*a*x - 7*sqrt(x)*sqrt(a)*sqrt( - a*x + 1) - 7*log(sqrt( - a*x + 1) + sqrt(x)*sqrt(a)*i)*i)/(4*a**2)