3.518 \(\int \left (1-a^{m x}\right )^2 \, dx\)

Optimal. Leaf size=33 \[ -\frac{2 a^{m x}}{m \log (a)}+\frac{a^{2 m x}}{2 m \log (a)}+x \]

[Out]

x - (2*a^(m*x))/(m*Log[a]) + a^(2*m*x)/(2*m*Log[a])

_______________________________________________________________________________________

Rubi [A]  time = 0.0281422, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182 \[ -\frac{2 a^{m x}}{m \log (a)}+\frac{a^{2 m x}}{2 m \log (a)}+x \]

Antiderivative was successfully verified.

[In]  Int[(1 - a^(m*x))^2,x]

[Out]

x - (2*a^(m*x))/(m*Log[a]) + a^(2*m*x)/(2*m*Log[a])

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ - \frac{2 a^{m x}}{m \log{\left (a \right )}} + \frac{\log{\left (a^{m x} \right )}}{m \log{\left (a \right )}} + \frac{\int ^{a^{m x}} x\, dx}{m \log{\left (a \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((1-a**(m*x))**2,x)

[Out]

-2*a**(m*x)/(m*log(a)) + log(a**(m*x))/(m*log(a)) + Integral(x, (x, a**(m*x)))/(
m*log(a))

_______________________________________________________________________________________

Mathematica [A]  time = 0.0224551, size = 25, normalized size = 0.76 \[ \frac{\left (a^{m x}-4\right ) a^{m x}}{2 m \log (a)}+x \]

Antiderivative was successfully verified.

[In]  Integrate[(1 - a^(m*x))^2,x]

[Out]

x + (a^(m*x)*(-4 + a^(m*x)))/(2*m*Log[a])

_______________________________________________________________________________________

Maple [A]  time = 0.003, size = 46, normalized size = 1.4 \[{\frac{ \left ({a}^{mx} \right ) ^{2}}{2\,m\ln \left ( a \right ) }}-2\,{\frac{{a}^{mx}}{m\ln \left ( a \right ) }}+{\frac{\ln \left ({a}^{mx} \right ) }{m\ln \left ( a \right ) }} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((1-a^(m*x))^2,x)

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 1.34398, size = 42, normalized size = 1.27 \[ x + \frac{a^{2 \, m x}}{2 \, m \log \left (a\right )} - \frac{2 \, a^{m x}}{m \log \left (a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a^(m*x) - 1)^2,x, algorithm="maxima")

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.215469, size = 39, normalized size = 1.18 \[ \frac{2 \, m x \log \left (a\right ) + a^{2 \, m x} - 4 \, a^{m x}}{2 \, m \log \left (a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a^(m*x) - 1)^2,x, algorithm="fricas")

[Out]

1/2*(2*m*x*log(a) + a^(2*m*x) - 4*a^(m*x))/(m*log(a))

_______________________________________________________________________________________

Sympy [A]  time = 0.126281, size = 46, normalized size = 1.39 \[ x + \begin{cases} \frac{a^{2 m x} m \log{\left (a \right )} - 4 a^{m x} m \log{\left (a \right )}}{2 m^{2} \log{\left (a \right )}^{2}} & \text{for}\: 2 m^{2} \log{\left (a \right )}^{2} \neq 0 \\- x & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((1-a**(m*x))**2,x)

[Out]

x + Piecewise(((a**(2*m*x)*m*log(a) - 4*a**(m*x)*m*log(a))/(2*m**2*log(a)**2), N
e(2*m**2*log(a)**2, 0)), (-x, True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.212845, size = 41, normalized size = 1.24 \[ \frac{2 \, m x{\rm ln}\left ({\left | a \right |}\right ) + a^{2 \, m x} - 4 \, a^{m x}}{2 \, m{\rm ln}\left (a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a^(m*x) - 1)^2,x, algorithm="giac")

[Out]

1/2*(2*m*x*ln(abs(a)) + a^(2*m*x) - 4*a^(m*x))/(m*ln(a))