3.5.56 \(\int (d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}) \, dx\) [456]

Optimal. Leaf size=68 \[ d x+\frac {e x^2}{2}+\frac {1}{2} f x \sqrt {a+\frac {e^2 x^2}{f^2}}+\frac {a f^2 \tanh ^{-1}\left (\frac {e x}{f \sqrt {a+\frac {e^2 x^2}{f^2}}}\right )}{2 e} \]

[Out]

d*x+1/2*e*x^2+1/2*a*f^2*arctanh(e*x/f/(a+e^2*x^2/f^2)^(1/2))/e+1/2*f*x*(a+e^2*x^2/f^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {201, 223, 212} \begin {gather*} \frac {1}{2} f x \sqrt {a+\frac {e^2 x^2}{f^2}}+\frac {a f^2 \tanh ^{-1}\left (\frac {e x}{f \sqrt {a+\frac {e^2 x^2}{f^2}}}\right )}{2 e}+d x+\frac {e x^2}{2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[d + e*x + f*Sqrt[a + (e^2*x^2)/f^2],x]

[Out]

d*x + (e*x^2)/2 + (f*x*Sqrt[a + (e^2*x^2)/f^2])/2 + (a*f^2*ArcTanh[(e*x)/(f*Sqrt[a + (e^2*x^2)/f^2])])/(2*e)

Rule 201

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^p/(n*p + 1)), x] + Dist[a*n*(p/(n*p + 1)),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rubi steps

\begin {align*} \int \left (d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}\right ) \, dx &=d x+\frac {e x^2}{2}+f \int \sqrt {a+\frac {e^2 x^2}{f^2}} \, dx\\ &=d x+\frac {e x^2}{2}+\frac {1}{2} f x \sqrt {a+\frac {e^2 x^2}{f^2}}+\frac {1}{2} (a f) \int \frac {1}{\sqrt {a+\frac {e^2 x^2}{f^2}}} \, dx\\ &=d x+\frac {e x^2}{2}+\frac {1}{2} f x \sqrt {a+\frac {e^2 x^2}{f^2}}+\frac {1}{2} (a f) \text {Subst}\left (\int \frac {1}{1-\frac {e^2 x^2}{f^2}} \, dx,x,\frac {x}{\sqrt {a+\frac {e^2 x^2}{f^2}}}\right )\\ &=d x+\frac {e x^2}{2}+\frac {1}{2} f x \sqrt {a+\frac {e^2 x^2}{f^2}}+\frac {a f^2 \tanh ^{-1}\left (\frac {e x}{f \sqrt {a+\frac {e^2 x^2}{f^2}}}\right )}{2 e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 83, normalized size = 1.22 \begin {gather*} d x+\frac {e x^2}{2}+\frac {1}{2} f x \sqrt {a+\frac {e^2 x^2}{f^2}}-\frac {a f \log \left (-\sqrt {\frac {e^2}{f^2}} x+\sqrt {a+\frac {e^2 x^2}{f^2}}\right )}{2 \sqrt {\frac {e^2}{f^2}}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[d + e*x + f*Sqrt[a + (e^2*x^2)/f^2],x]

[Out]

d*x + (e*x^2)/2 + (f*x*Sqrt[a + (e^2*x^2)/f^2])/2 - (a*f*Log[-(Sqrt[e^2/f^2]*x) + Sqrt[a + (e^2*x^2)/f^2]])/(2
*Sqrt[e^2/f^2])

________________________________________________________________________________________

Maple [A]
time = 0.24, size = 75, normalized size = 1.10

method result size
default \(d x +\frac {e \,x^{2}}{2}+\frac {f x \sqrt {a +\frac {e^{2} x^{2}}{f^{2}}}}{2}+\frac {f a \ln \left (\frac {e^{2} x}{f^{2} \sqrt {\frac {e^{2}}{f^{2}}}}+\sqrt {a +\frac {e^{2} x^{2}}{f^{2}}}\right )}{2 \sqrt {\frac {e^{2}}{f^{2}}}}\) \(75\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(d+e*x+f*(a+1/f^2*e^2*x^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

d*x+1/2*e*x^2+1/2*f*x*(a+1/f^2*e^2*x^2)^(1/2)+1/2*f*a*ln(1/f^2*e^2*x/(1/f^2*e^2)^(1/2)+(a+1/f^2*e^2*x^2)^(1/2)
)/(1/f^2*e^2)^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 46, normalized size = 0.68 \begin {gather*} \frac {1}{2} \, x^{2} e + \frac {1}{2} \, {\left (a f \operatorname {arsinh}\left (\frac {x e}{\sqrt {a} f}\right ) e^{\left (-1\right )} + \sqrt {a + \frac {x^{2} e^{2}}{f^{2}}} x\right )} f + d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(d+e*x+f*(a+e^2*x^2/f^2)^(1/2),x, algorithm="maxima")

[Out]

1/2*x^2*e + 1/2*(a*f*arcsinh(x*e/(sqrt(a)*f))*e^(-1) + sqrt(a + x^2*e^2/f^2)*x)*f + d*x

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 74, normalized size = 1.09 \begin {gather*} -\frac {1}{2} \, {\left (a f^{2} \log \left (-x e + f \sqrt {\frac {a f^{2} + x^{2} e^{2}}{f^{2}}}\right ) - f x \sqrt {\frac {a f^{2} + x^{2} e^{2}}{f^{2}}} e - x^{2} e^{2} - 2 \, d x e\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(d+e*x+f*(a+e^2*x^2/f^2)^(1/2),x, algorithm="fricas")

[Out]

-1/2*(a*f^2*log(-x*e + f*sqrt((a*f^2 + x^2*e^2)/f^2)) - f*x*sqrt((a*f^2 + x^2*e^2)/f^2)*e - x^2*e^2 - 2*d*x*e)
*e^(-1)

________________________________________________________________________________________

Sympy [A]
time = 1.17, size = 54, normalized size = 0.79 \begin {gather*} d x + \frac {e x^{2}}{2} + f \left (\frac {\sqrt {a} x \sqrt {1 + \frac {e^{2} x^{2}}{a f^{2}}}}{2} + \frac {a f \operatorname {asinh}{\left (\frac {e x}{\sqrt {a} f} \right )}}{2 e}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(d+e*x+f*(a+e**2*x**2/f**2)**(1/2),x)

[Out]

d*x + e*x**2/2 + f*(sqrt(a)*x*sqrt(1 + e**2*x**2/(a*f**2))/2 + a*f*asinh(e*x/(sqrt(a)*f))/(2*e))

________________________________________________________________________________________

Giac [A]
time = 3.31, size = 65, normalized size = 0.96 \begin {gather*} \frac {1}{2} \, x^{2} e + d x - \frac {{\left (a f^{2} e^{\left (-1\right )} \log \left ({\left | -x e + \sqrt {a f^{2} + x^{2} e^{2}} \right |}\right ) - \sqrt {a f^{2} + x^{2} e^{2}} x\right )} {\left | f \right |}}{2 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(d+e*x+f*(a+e^2*x^2/f^2)^(1/2),x, algorithm="giac")

[Out]

1/2*x^2*e + d*x - 1/2*(a*f^2*e^(-1)*log(abs(-x*e + sqrt(a*f^2 + x^2*e^2))) - sqrt(a*f^2 + x^2*e^2)*x)*abs(f)/f

________________________________________________________________________________________

Mupad [B]
time = 3.89, size = 136, normalized size = 2.00 \begin {gather*} \left \{\begin {array}{cl} x\,\left (d+\sqrt {a}\,f\right ) & \text {\ if\ \ }e=0\\ d\,x+\frac {e\,x^2}{2}+\frac {f\,x\,\sqrt {a+\frac {e^2\,x^2}{f^2}}}{2}+\frac {a\,e^2\,\ln \left (x\,\sqrt {\frac {e^2}{f^2}}+\sqrt {a+\frac {e^2\,x^2}{f^2}}\right )}{f\,{\left (\frac {e^2}{f^2}\right )}^{3/2}}-\frac {a\,e^2\,\ln \left (2\,x\,\sqrt {\frac {e^2}{f^2}}+2\,\sqrt {a+\frac {e^2\,x^2}{f^2}}\right )}{2\,f\,{\left (\frac {e^2}{f^2}\right )}^{3/2}} & \text {\ if\ \ }e\neq 0 \end {array}\right . \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(d + e*x + f*(a + (e^2*x^2)/f^2)^(1/2),x)

[Out]

piecewise(e == 0, x*(d + a^(1/2)*f), e ~= 0, d*x + (e*x^2)/2 + (f*x*(a + (e^2*x^2)/f^2)^(1/2))/2 + (a*e^2*log(
x*(e^2/f^2)^(1/2) + (a + (e^2*x^2)/f^2)^(1/2)))/(f*(e^2/f^2)^(3/2)) - (a*e^2*log(2*x*(e^2/f^2)^(1/2) + 2*(a +
(e^2*x^2)/f^2)^(1/2)))/(2*f*(e^2/f^2)^(3/2)))

________________________________________________________________________________________