3.513 \(\int (1+a^{m x})^2 \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2282, 43} \[ \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])

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 31, normalized size = 0.94 \[ \frac {2 a^{m x}+\frac {1}{2} a^{2 m x}+m x \log (a)}{m \log (a)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (1+a^{m x}\right )^2 \, dx \]

Verification is Not applicable to the result.

[In]

IntegrateAlgebraic[(1 + a^(m*x))^2,x]

[Out]

Could not integrate

________________________________________________________________________________________

fricas [A]  time = 1.17, size = 29, normalized size = 0.88 \[ \frac {2 \, m x \log \relax (a) + a^{2 \, m x} + 4 \, a^{m x}}{2 \, m \log \relax (a)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+a^(m*x))^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.58, size = 30, normalized size = 0.91 \[ \frac {2 \, m x \log \left ({\left | a \right |}\right ) + a^{2 \, m x} + 4 \, a^{m x}}{2 \, m \log \relax (a)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+a^(m*x))^2,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 32, normalized size = 0.97




method result size



derivativedivides \(\frac {\frac {a^{2 m x}}{2}+2 a^{m x}+\ln \left (a^{m x}\right )}{m \ln \relax (a )}\) \(32\)
default \(\frac {\frac {a^{2 m x}}{2}+2 a^{m x}+\ln \left (a^{m x}\right )}{m \ln \relax (a )}\) \(32\)
risch \(x +\frac {2 a^{m x}}{m \ln \relax (a )}+\frac {a^{2 m x}}{2 m \ln \relax (a )}\) \(33\)
norman \(x +\frac {2 \,{\mathrm e}^{m x \ln \relax (a )}}{m \ln \relax (a )}+\frac {{\mathrm e}^{2 m x \ln \relax (a )}}{2 m \ln \relax (a )}\) \(35\)
meijerg error in int/gbinthm/express: improper op or subscript selector\ N/A



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+a^(m*x))^2,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.53, size = 31, normalized size = 0.94 \[ x + \frac {a^{2 \, m x}}{2 \, m \log \relax (a)} + \frac {2 \, a^{m x}}{m \log \relax (a)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+a^(m*x))^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.32, size = 26, normalized size = 0.79 \[ x+\frac {2\,a^{m\,x}+\frac {a^{2\,m\,x}}{2}}{m\,\ln \relax (a)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a^(m*x) + 1)^2,x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 46, normalized size = 1.39 \[ x + \begin {cases} \frac {a^{2 m x} m \log {\relax (a )} + 4 a^{m x} m \log {\relax (a )}}{2 m^{2} \log {\relax (a )}^{2}} & \text {for}\: 2 m^{2} \log {\relax (a )}^{2} \neq 0 \\3 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), Ne(2*m**2*log(a)**2, 0)), (3*x,
 True))

________________________________________________________________________________________