3.2.94 \(\int \frac {\text {b1}+\text {c1} x}{a+2 b x+c x^2} \, dx\) [194]

Optimal. Leaf size=65 \[ -\frac {(\text {b1} c-b \text {c1}) \tanh ^{-1}\left (\frac {b+c x}{\sqrt {b^2-a c}}\right )}{c \sqrt {b^2-a c}}+\frac {\text {c1} \log \left (a+2 b x+c x^2\right )}{2 c} \]

[Out]

1/2*c1*ln(c*x^2+2*b*x+a)/c-(-b*c1+b1*c)*arctanh((c*x+b)/(-a*c+b^2)^(1/2))/c/(-a*c+b^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {648, 632, 212, 642} \begin {gather*} \frac {\text {c1} \log \left (a+2 b x+c x^2\right )}{2 c}-\frac {(\text {b1} c-b \text {c1}) \tanh ^{-1}\left (\frac {b+c x}{\sqrt {b^2-a c}}\right )}{c \sqrt {b^2-a c}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(b1 + c1*x)/(a + 2*b*x + c*x^2),x]

[Out]

-(((b1*c - b*c1)*ArcTanh[(b + c*x)/Sqrt[b^2 - a*c]])/(c*Sqrt[b^2 - a*c])) + (c1*Log[a + 2*b*x + c*x^2])/(2*c)

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 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rubi steps

\begin {align*} \int \frac {\text {b1}+\text {c1} x}{a+2 b x+c x^2} \, dx &=\frac {\text {c1} \int \frac {2 b+2 c x}{a+2 b x+c x^2} \, dx}{2 c}+\frac {(2 \text {b1} c-2 b \text {c1}) \int \frac {1}{a+2 b x+c x^2} \, dx}{2 c}\\ &=\frac {\text {c1} \log \left (a+2 b x+c x^2\right )}{2 c}-\frac {(2 \text {b1} c-2 b \text {c1}) \text {Subst}\left (\int \frac {1}{4 \left (b^2-a c\right )-x^2} \, dx,x,2 b+2 c x\right )}{c}\\ &=-\frac {(\text {b1} c-b \text {c1}) \tanh ^{-1}\left (\frac {b+c x}{\sqrt {b^2-a c}}\right )}{c \sqrt {b^2-a c}}+\frac {\text {c1} \log \left (a+2 b x+c x^2\right )}{2 c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 66, normalized size = 1.02 \begin {gather*} \frac {(\text {b1} c-b \text {c1}) \tan ^{-1}\left (\frac {b+c x}{\sqrt {-b^2+a c}}\right )}{c \sqrt {-b^2+a c}}+\frac {\text {c1} \log \left (a+2 b x+c x^2\right )}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(b1 + c1*x)/(a + 2*b*x + c*x^2),x]

[Out]

((b1*c - b*c1)*ArcTan[(b + c*x)/Sqrt[-b^2 + a*c]])/(c*Sqrt[-b^2 + a*c]) + (c1*Log[a + 2*b*x + c*x^2])/(2*c)

________________________________________________________________________________________

Maple [A]
time = 0.14, size = 63, normalized size = 0.97

method result size
default \(\frac {\mathit {c1} \ln \left (c \,x^{2}+2 b x +a \right )}{2 c}+\frac {\left (\mathit {b1} -\frac {\mathit {c1} b}{c}\right ) \arctan \left (\frac {2 c x +2 b}{2 \sqrt {a c -b^{2}}}\right )}{\sqrt {a c -b^{2}}}\) \(63\)
risch \(\frac {\ln \left (-a b c \mathit {c1} +a \mathit {b1} \,c^{2}+b^{3} \mathit {c1} -b^{2} \mathit {b1} c -\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, c x -\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, b \right ) a \mathit {c1}}{2 a c -2 b^{2}}-\frac {\ln \left (-a b c \mathit {c1} +a \mathit {b1} \,c^{2}+b^{3} \mathit {c1} -b^{2} \mathit {b1} c -\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, c x -\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, b \right ) b^{2} \mathit {c1}}{2 c \left (a c -b^{2}\right )}+\frac {\ln \left (-a b c \mathit {c1} +a \mathit {b1} \,c^{2}+b^{3} \mathit {c1} -b^{2} \mathit {b1} c -\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, c x -\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, b \right ) \sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}}{2 c \left (a c -b^{2}\right )}+\frac {\ln \left (-a b c \mathit {c1} +a \mathit {b1} \,c^{2}+b^{3} \mathit {c1} -b^{2} \mathit {b1} c +\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, c x +\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, b \right ) a \mathit {c1}}{2 a c -2 b^{2}}-\frac {\ln \left (-a b c \mathit {c1} +a \mathit {b1} \,c^{2}+b^{3} \mathit {c1} -b^{2} \mathit {b1} c +\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, c x +\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, b \right ) b^{2} \mathit {c1}}{2 c \left (a c -b^{2}\right )}-\frac {\ln \left (-a b c \mathit {c1} +a \mathit {b1} \,c^{2}+b^{3} \mathit {c1} -b^{2} \mathit {b1} c +\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, c x +\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, b \right ) \sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}}{2 c \left (a c -b^{2}\right )}\) \(618\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c1*x+b1)/(c*x^2+2*b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/2*c1*ln(c*x^2+2*b*x+a)/c+(b1-c1*b/c)/(a*c-b^2)^(1/2)*arctan(1/2*(2*c*x+2*b)/(a*c-b^2)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c1*x+b1)/(c*x^2+2*b*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a*c>0)', see `assume?`
 for more de

________________________________________________________________________________________

Fricas [A]
time = 0.42, size = 203, normalized size = 3.12 \begin {gather*} \left [\frac {{\left (b^{2} - a c\right )} c_{1} \log \left (c x^{2} + 2 \, b x + a\right ) - \sqrt {b^{2} - a c} {\left (b_{1} c - b c_{1}\right )} \log \left (\frac {c^{2} x^{2} + 2 \, b c x + 2 \, b^{2} - a c + 2 \, \sqrt {b^{2} - a c} {\left (c x + b\right )}}{c x^{2} + 2 \, b x + a}\right )}{2 \, {\left (b^{2} c - a c^{2}\right )}}, \frac {{\left (b^{2} - a c\right )} c_{1} \log \left (c x^{2} + 2 \, b x + a\right ) - 2 \, \sqrt {-b^{2} + a c} {\left (b_{1} c - b c_{1}\right )} \arctan \left (-\frac {\sqrt {-b^{2} + a c} {\left (c x + b\right )}}{b^{2} - a c}\right )}{2 \, {\left (b^{2} c - a c^{2}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c1*x+b1)/(c*x^2+2*b*x+a),x, algorithm="fricas")

[Out]

[1/2*((b^2 - a*c)*c1*log(c*x^2 + 2*b*x + a) - sqrt(b^2 - a*c)*(b1*c - b*c1)*log((c^2*x^2 + 2*b*c*x + 2*b^2 - a
*c + 2*sqrt(b^2 - a*c)*(c*x + b))/(c*x^2 + 2*b*x + a)))/(b^2*c - a*c^2), 1/2*((b^2 - a*c)*c1*log(c*x^2 + 2*b*x
 + a) - 2*sqrt(-b^2 + a*c)*(b1*c - b*c1)*arctan(-sqrt(-b^2 + a*c)*(c*x + b)/(b^2 - a*c)))/(b^2*c - a*c^2)]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 246 vs. \(2 (53) = 106\).
time = 0.40, size = 246, normalized size = 3.78 \begin {gather*} \left (\frac {c_{1}}{2 c} - \frac {\sqrt {- a c + b^{2}} \left (b c_{1} - b_{1} c\right )}{2 c \left (a c - b^{2}\right )}\right ) \log {\left (x + \frac {- 2 a c \left (\frac {c_{1}}{2 c} - \frac {\sqrt {- a c + b^{2}} \left (b c_{1} - b_{1} c\right )}{2 c \left (a c - b^{2}\right )}\right ) + a c_{1} + 2 b^{2} \left (\frac {c_{1}}{2 c} - \frac {\sqrt {- a c + b^{2}} \left (b c_{1} - b_{1} c\right )}{2 c \left (a c - b^{2}\right )}\right ) - b b_{1}}{b c_{1} - b_{1} c} \right )} + \left (\frac {c_{1}}{2 c} + \frac {\sqrt {- a c + b^{2}} \left (b c_{1} - b_{1} c\right )}{2 c \left (a c - b^{2}\right )}\right ) \log {\left (x + \frac {- 2 a c \left (\frac {c_{1}}{2 c} + \frac {\sqrt {- a c + b^{2}} \left (b c_{1} - b_{1} c\right )}{2 c \left (a c - b^{2}\right )}\right ) + a c_{1} + 2 b^{2} \left (\frac {c_{1}}{2 c} + \frac {\sqrt {- a c + b^{2}} \left (b c_{1} - b_{1} c\right )}{2 c \left (a c - b^{2}\right )}\right ) - b b_{1}}{b c_{1} - b_{1} c} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c1*x+b1)/(c*x**2+2*b*x+a),x)

[Out]

(c1/(2*c) - sqrt(-a*c + b**2)*(b*c1 - b1*c)/(2*c*(a*c - b**2)))*log(x + (-2*a*c*(c1/(2*c) - sqrt(-a*c + b**2)*
(b*c1 - b1*c)/(2*c*(a*c - b**2))) + a*c1 + 2*b**2*(c1/(2*c) - sqrt(-a*c + b**2)*(b*c1 - b1*c)/(2*c*(a*c - b**2
))) - b*b1)/(b*c1 - b1*c)) + (c1/(2*c) + sqrt(-a*c + b**2)*(b*c1 - b1*c)/(2*c*(a*c - b**2)))*log(x + (-2*a*c*(
c1/(2*c) + sqrt(-a*c + b**2)*(b*c1 - b1*c)/(2*c*(a*c - b**2))) + a*c1 + 2*b**2*(c1/(2*c) + sqrt(-a*c + b**2)*(
b*c1 - b1*c)/(2*c*(a*c - b**2))) - b*b1)/(b*c1 - b1*c))

________________________________________________________________________________________

Giac [A]
time = 1.48, size = 60, normalized size = 0.92 \begin {gather*} \frac {c_{1} \log \left (c x^{2} + 2 \, b x + a\right )}{2 \, c} + \frac {{\left (b_{1} c - b c_{1}\right )} \arctan \left (\frac {c x + b}{\sqrt {-b^{2} + a c}}\right )}{\sqrt {-b^{2} + a c} c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c1*x+b1)/(c*x^2+2*b*x+a),x, algorithm="giac")

[Out]

1/2*c1*log(c*x^2 + 2*b*x + a)/c + (b1*c - b*c1)*arctan((c*x + b)/sqrt(-b^2 + a*c))/(sqrt(-b^2 + a*c)*c)

________________________________________________________________________________________

Mupad [B]
time = 0.27, size = 155, normalized size = 2.38 \begin {gather*} \frac {b_{1}\,\mathrm {atan}\left (\frac {b}{\sqrt {a\,c-b^2}}+\frac {c\,x}{\sqrt {a\,c-b^2}}\right )}{\sqrt {a\,c-b^2}}-\frac {2\,b^2\,c_{1}\,\ln \left (c\,x^2+2\,b\,x+a\right )}{4\,a\,c^2-4\,b^2\,c}+\frac {2\,a\,c\,c_{1}\,\ln \left (c\,x^2+2\,b\,x+a\right )}{4\,a\,c^2-4\,b^2\,c}-\frac {b\,c_{1}\,\mathrm {atan}\left (\frac {b}{\sqrt {a\,c-b^2}}+\frac {c\,x}{\sqrt {a\,c-b^2}}\right )}{c\,\sqrt {a\,c-b^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b1 + c1*x)/(a + 2*b*x + c*x^2),x)

[Out]

(b1*atan(b/(a*c - b^2)^(1/2) + (c*x)/(a*c - b^2)^(1/2)))/(a*c - b^2)^(1/2) - (2*b^2*c1*log(a + 2*b*x + c*x^2))
/(4*a*c^2 - 4*b^2*c) + (2*a*c*c1*log(a + 2*b*x + c*x^2))/(4*a*c^2 - 4*b^2*c) - (b*c1*atan(b/(a*c - b^2)^(1/2)
+ (c*x)/(a*c - b^2)^(1/2)))/(c*(a*c - b^2)^(1/2))

________________________________________________________________________________________