3.2 \(\int \frac {-2 \log (-\sqrt {-1+a x})+\log (-1+a x)}{2 \pi \sqrt {-1+a x}} \, dx\)

Optimal. Leaf size=15 \[ -\frac {2 \sqrt {1-a x}}{a} \]

[Out]

-2*(-a*x+1)^(1/2)/a

________________________________________________________________________________________

Rubi [C]  time = 0.06, antiderivative size = 52, normalized size of antiderivative = 3.47, number of steps used = 5, number of rules used = 2, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.054, Rules used = {12, 2295} \[ \frac {\sqrt {a x-1} \log (a x-1)}{\pi a}-\frac {2 \sqrt {a x-1} \log \left (-\sqrt {a x-1}\right )}{\pi a} \]

Antiderivative was successfully verified.

[In]

Int[(-2*Log[-Sqrt[-1 + a*x]] + Log[-1 + a*x])/(2*Pi*Sqrt[-1 + a*x]),x]

[Out]

(-2*Sqrt[-1 + a*x]*Log[-Sqrt[-1 + a*x]])/(a*Pi) + (Sqrt[-1 + a*x]*Log[-1 + a*x])/(a*Pi)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rubi steps

\begin {align*} \int \frac {-2 \log \left (-\sqrt {-1+a x}\right )+\log (-1+a x)}{2 \pi \sqrt {-1+a x}} \, dx &=\frac {\int \frac {-2 \log \left (-\sqrt {-1+a x}\right )+\log (-1+a x)}{\sqrt {-1+a x}} \, dx}{2 \pi }\\ &=\frac {\operatorname {Subst}\left (\int \left (-2 \log (-x)+\log \left (x^2\right )\right ) \, dx,x,\sqrt {-1+a x}\right )}{a \pi }\\ &=\frac {\operatorname {Subst}\left (\int \log \left (x^2\right ) \, dx,x,\sqrt {-1+a x}\right )}{a \pi }-\frac {2 \operatorname {Subst}\left (\int \log (-x) \, dx,x,\sqrt {-1+a x}\right )}{a \pi }\\ &=-\frac {2 \sqrt {-1+a x} \log \left (-\sqrt {-1+a x}\right )}{a \pi }+\frac {\sqrt {-1+a x} \log (-1+a x)}{a \pi }\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.03, size = 37, normalized size = 2.47 \[ \frac {\sqrt {a x-1} \left (\log (a x-1)-2 \log \left (-\sqrt {a x-1}\right )\right )}{\pi a} \]

Antiderivative was successfully verified.

[In]

Integrate[(-2*Log[-Sqrt[-1 + a*x]] + Log[-1 + a*x])/(2*Pi*Sqrt[-1 + a*x]),x]

[Out]

(Sqrt[-1 + a*x]*(-2*Log[-Sqrt[-1 + a*x]] + Log[-1 + a*x]))/(a*Pi)

________________________________________________________________________________________

fricas [A]  time = 0.85, size = 1, normalized size = 0.07 \[ 0 \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*(log(a*x-1)-2*log(-(a*x-1)^(1/2)))/pi/(a*x-1)^(1/2),x, algorithm="fricas")

[Out]

0

________________________________________________________________________________________

giac [B]  time = 1.06, size = 41, normalized size = 2.73 \[ \frac {\sqrt {a x - 1} \log \left (a x - 1\right ) - 2 \, \sqrt {a x - 1} \log \left (-\sqrt {a x - 1}\right )}{\pi a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*(log(a*x-1)-2*log(-(a*x-1)^(1/2)))/pi/(a*x-1)^(1/2),x, algorithm="giac")

[Out]

(sqrt(a*x - 1)*log(a*x - 1) - 2*sqrt(a*x - 1)*log(-sqrt(a*x - 1)))/(pi*a)

________________________________________________________________________________________

maple [C]  time = 0.00, size = 34, normalized size = 2.27 \[ \frac {\sqrt {a x -1}\, \left (-2 \ln \left (-\sqrt {a x -1}\right )+\ln \left (a x -1\right )\right )}{\pi a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/2*(ln(a*x-1)-2*ln(-(a*x-1)^(1/2)))/Pi/(a*x-1)^(1/2),x)

[Out]

(a*x-1)^(1/2)*(ln(a*x-1)-2*ln(-(a*x-1)^(1/2)))/a/Pi

________________________________________________________________________________________

maxima [B]  time = 0.47, size = 41, normalized size = 2.73 \[ \frac {\sqrt {a x - 1} \log \left (a x - 1\right ) - 2 \, \sqrt {a x - 1} \log \left (-\sqrt {a x - 1}\right )}{\pi a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*(log(a*x-1)-2*log(-(a*x-1)^(1/2)))/pi/(a*x-1)^(1/2),x, algorithm="maxima")

[Out]

(sqrt(a*x - 1)*log(a*x - 1) - 2*sqrt(a*x - 1)*log(-sqrt(a*x - 1)))/(pi*a)

________________________________________________________________________________________

mupad [B]  time = 0.51, size = 43, normalized size = 2.87 \[ -\frac {2\,\ln \left (-\sqrt {a\,x-1}\right )\,\sqrt {a\,x-1}-\ln \left (a\,x-1\right )\,\sqrt {a\,x-1}}{\Pi \,a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(a*x - 1)/2 - log(-(a*x - 1)^(1/2)))/(Pi*(a*x - 1)^(1/2)),x)

[Out]

-(2*log(-(a*x - 1)^(1/2))*(a*x - 1)^(1/2) - log(a*x - 1)*(a*x - 1)^(1/2))/(Pi*a)

________________________________________________________________________________________

sympy [A]  time = 59.58, size = 42, normalized size = 2.80 \[ \frac {\begin {cases} \frac {- 2 \sqrt {a x - 1} \log {\left (- \sqrt {a x - 1} \right )} + \sqrt {a x - 1} \log {\left (a x - 1 \right )}}{a} & \text {for}\: a \neq 0 \\\pi x & \text {otherwise} \end {cases}}{\pi } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*(ln(a*x-1)-2*ln(-(a*x-1)**(1/2)))/pi/(a*x-1)**(1/2),x)

[Out]

Piecewise(((-2*sqrt(a*x - 1)*log(-sqrt(a*x - 1)) + sqrt(a*x - 1)*log(a*x - 1))/a, Ne(a, 0)), (pi*x, True))/pi

________________________________________________________________________________________