3.194 \(\int \frac {\text {b1}+\text {c1} x}{a+2 b x+c x^2} \, dx\)

Optimal. Leaf size=65 \[ \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}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, 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 = {634, 618, 206, 628} \[ \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}} \]

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 206

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

Rule 618

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 628

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 634

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}) \operatorname {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.05, size = 66, normalized size = 1.02 \[ \frac {(\text {b1} c-b \text {c1}) \tan ^{-1}\left (\frac {b+c x}{\sqrt {a c-b^2}}\right )}{c \sqrt {a c-b^2}}+\frac {\text {c1} \log \left (a+2 b x+c x^2\right )}{2 c} \]

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)

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.06, size = 79, normalized size = 1.22 \[ \frac {(\text {b1} c-b \text {c1}) \tan ^{-1}\left (\frac {c x}{\sqrt {a c-b^2}}+\frac {b}{\sqrt {a c-b^2}}\right )}{c \sqrt {a c-b^2}}+\frac {\text {c1} \log \left (a+2 b x+c x^2\right )}{2 c} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 203, normalized size = 3.12 \[ \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 ] \]

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)]

________________________________________________________________________________________

giac [A]  time = 0.77, size = 60, normalized size = 0.92 \[ \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} \]

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)

________________________________________________________________________________________

maple [A]  time = 0.35, 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 \[ \text {Exception raised: ValueError} \]

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 details)Is 4*b^2-4*a*c positive or negative?

________________________________________________________________________________________

mupad [B]  time = 0.27, size = 155, normalized size = 2.38 \[ \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}} \]

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))

________________________________________________________________________________________

sympy [B]  time = 0.76, size = 246, normalized size = 3.78 \[ \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 )} \]

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))

________________________________________________________________________________________