Integrand size = 22, antiderivative size = 126 \[ \int \frac {(f+g x)^2}{\left (d^2-e^2 x^2\right )^3} \, dx=\frac {2 d^2 f g+\left (e^2 f^2+d^2 g^2\right ) x}{4 d^2 e^2 \left (d^2-e^2 x^2\right )^2}+\frac {\left (3 e^2 f^2-d^2 g^2\right ) x}{8 d^4 e^2 \left (d^2-e^2 x^2\right )}+\frac {\left (3 e^2 f^2-d^2 g^2\right ) \text {arctanh}\left (\frac {e x}{d}\right )}{8 d^5 e^3} \] Output:
1/4*(2*d^2*f*g+(d^2*g^2+e^2*f^2)*x)/d^2/e^2/(-e^2*x^2+d^2)^2+1/8*(-d^2*g^2 +3*e^2*f^2)*x/d^4/e^2/(-e^2*x^2+d^2)+1/8*(-d^2*g^2+3*e^2*f^2)*arctanh(e*x/ d)/d^5/e^3
Time = 0.03 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.87 \[ \int \frac {(f+g x)^2}{\left (d^2-e^2 x^2\right )^3} \, dx=\frac {-3 d e^5 f^2 x^3+d^5 e g (4 f+g x)+d^3 e^3 x \left (5 f^2+g^2 x^2\right )+\left (3 e^2 f^2-d^2 g^2\right ) \left (d^2-e^2 x^2\right )^2 \text {arctanh}\left (\frac {e x}{d}\right )}{8 d^5 e^3 \left (d^2-e^2 x^2\right )^2} \] Input:
Integrate[(f + g*x)^2/(d^2 - e^2*x^2)^3,x]
Output:
(-3*d*e^5*f^2*x^3 + d^5*e*g*(4*f + g*x) + d^3*e^3*x*(5*f^2 + g^2*x^2) + (3 *e^2*f^2 - d^2*g^2)*(d^2 - e^2*x^2)^2*ArcTanh[(e*x)/d])/(8*d^5*e^3*(d^2 - e^2*x^2)^2)
Time = 0.37 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.25, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {477, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(f+g x)^2}{\left (d^2-e^2 x^2\right )^3} \, dx\) |
\(\Big \downarrow \) 477 |
\(\displaystyle \frac {\int \left (\frac {(e f+d g)^2 d^3}{8 e^2 (d-e x)^3}+\frac {(e f-d g)^2 d^3}{8 e^2 (d+e x)^3}+\frac {\left (3 f^2-\frac {d^2 g^2}{e^2}\right ) d^2}{8 \left (d^2-e^2 x^2\right )}+\frac {(3 e f-d g) (e f+d g) d^2}{16 e^2 (d-e x)^2}+\frac {(e f-d g) (3 e f+d g) d^2}{16 e^2 (d+e x)^2}\right )dx}{d^6}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {d \text {arctanh}\left (\frac {e x}{d}\right ) \left (3 e^2 f^2-d^2 g^2\right )}{8 e^3}+\frac {d^3 (d g+e f)^2}{16 e^3 (d-e x)^2}-\frac {d^3 (e f-d g)^2}{16 e^3 (d+e x)^2}+\frac {d^2 (3 e f-d g) (d g+e f)}{16 e^3 (d-e x)}-\frac {d^2 (e f-d g) (d g+3 e f)}{16 e^3 (d+e x)}}{d^6}\) |
Input:
Int[(f + g*x)^2/(d^2 - e^2*x^2)^3,x]
Output:
((d^3*(e*f + d*g)^2)/(16*e^3*(d - e*x)^2) + (d^2*(3*e*f - d*g)*(e*f + d*g) )/(16*e^3*(d - e*x)) - (d^3*(e*f - d*g)^2)/(16*e^3*(d + e*x)^2) - (d^2*(e* f - d*g)*(3*e*f + d*g))/(16*e^3*(d + e*x)) + (d*(3*e^2*f^2 - d^2*g^2)*ArcT anh[(e*x)/d])/(8*e^3))/d^6
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ a^p Int[ExpandIntegrand[(c + d*x)^n*(1 - Rt[-b/a, 2]*x)^p*(1 + Rt[-b/a, 2 ]*x)^p, x], x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[p, 0] && IntegerQ[n] & & NiceSqrtQ[-b/a] && !FractionalPowerFactorQ[Rt[-b/a, 2]]
Time = 0.70 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.07
method | result | size |
norman | \(\frac {\frac {f g}{2 e^{2}}+\frac {\left (d^{2} g^{2}-3 e^{2} f^{2}\right ) x^{3}}{8 d^{4}}+\frac {\left (d^{2} g^{2}+5 e^{2} f^{2}\right ) x}{8 d^{2} e^{2}}}{\left (-e^{2} x^{2}+d^{2}\right )^{2}}+\frac {\left (d^{2} g^{2}-3 e^{2} f^{2}\right ) \ln \left (-e x +d \right )}{16 d^{5} e^{3}}-\frac {\left (d^{2} g^{2}-3 e^{2} f^{2}\right ) \ln \left (e x +d \right )}{16 d^{5} e^{3}}\) | \(135\) |
risch | \(\frac {\frac {f g}{2 e^{2}}+\frac {\left (d^{2} g^{2}-3 e^{2} f^{2}\right ) x^{3}}{8 d^{4}}+\frac {\left (d^{2} g^{2}+5 e^{2} f^{2}\right ) x}{8 d^{2} e^{2}}}{\left (-e^{2} x^{2}+d^{2}\right )^{2}}+\frac {\ln \left (e x -d \right ) g^{2}}{16 d^{3} e^{3}}-\frac {3 \ln \left (e x -d \right ) f^{2}}{16 d^{5} e}-\frac {\ln \left (-e x -d \right ) g^{2}}{16 d^{3} e^{3}}+\frac {3 \ln \left (-e x -d \right ) f^{2}}{16 d^{5} e}\) | \(152\) |
default | \(\frac {\left (-d^{2} g^{2}+3 e^{2} f^{2}\right ) \ln \left (e x +d \right )}{16 e^{3} d^{5}}-\frac {-d^{2} g^{2}-2 d e f g +3 e^{2} f^{2}}{16 d^{4} e^{3} \left (e x +d \right )}-\frac {d^{2} g^{2}-2 d e f g +e^{2} f^{2}}{16 d^{3} e^{3} \left (e x +d \right )^{2}}+\frac {\left (d^{2} g^{2}-3 e^{2} f^{2}\right ) \ln \left (-e x +d \right )}{16 d^{5} e^{3}}-\frac {-d^{2} g^{2}-2 d e f g -e^{2} f^{2}}{16 d^{3} e^{3} \left (-e x +d \right )^{2}}+\frac {-d^{2} g^{2}+2 d e f g +3 e^{2} f^{2}}{16 d^{4} e^{3} \left (-e x +d \right )}\) | \(216\) |
parallelrisch | \(\frac {\ln \left (e x -d \right ) x^{4} d^{2} e^{5} g^{2}-3 \ln \left (e x -d \right ) x^{4} e^{7} f^{2}-\ln \left (e x +d \right ) x^{4} d^{2} e^{5} g^{2}+3 \ln \left (e x +d \right ) x^{4} e^{7} f^{2}-2 \ln \left (e x -d \right ) x^{2} d^{4} e^{3} g^{2}+6 \ln \left (e x -d \right ) x^{2} d^{2} e^{5} f^{2}+2 \ln \left (e x +d \right ) x^{2} d^{4} e^{3} g^{2}-6 \ln \left (e x +d \right ) x^{2} d^{2} e^{5} f^{2}+2 x^{3} d^{3} e^{4} g^{2}-6 x^{3} d \,e^{6} f^{2}+\ln \left (e x -d \right ) d^{6} e \,g^{2}-3 \ln \left (e x -d \right ) d^{4} e^{3} f^{2}-\ln \left (e x +d \right ) d^{6} e \,g^{2}+3 \ln \left (e x +d \right ) d^{4} e^{3} f^{2}+2 x \,d^{5} e^{2} g^{2}+10 x \,d^{3} e^{4} f^{2}+8 d^{5} e^{2} f g}{16 e^{4} d^{5} \left (e^{2} x^{2}-d^{2}\right )^{2}}\) | \(313\) |
Input:
int((g*x+f)^2/(-e^2*x^2+d^2)^3,x,method=_RETURNVERBOSE)
Output:
(1/2*f*g/e^2+1/8/d^4*(d^2*g^2-3*e^2*f^2)*x^3+1/8*(d^2*g^2+5*e^2*f^2)/d^2/e ^2*x)/(-e^2*x^2+d^2)^2+1/16*(d^2*g^2-3*e^2*f^2)/d^5/e^3*ln(-e*x+d)-1/16*(d ^2*g^2-3*e^2*f^2)/d^5/e^3*ln(e*x+d)
Leaf count of result is larger than twice the leaf count of optimal. 252 vs. \(2 (122) = 244\).
Time = 0.08 (sec) , antiderivative size = 252, normalized size of antiderivative = 2.00 \[ \int \frac {(f+g x)^2}{\left (d^2-e^2 x^2\right )^3} \, dx=\frac {8 \, d^{5} e f g - 2 \, {\left (3 \, d e^{5} f^{2} - d^{3} e^{3} g^{2}\right )} x^{3} + 2 \, {\left (5 \, d^{3} e^{3} f^{2} + d^{5} e g^{2}\right )} x + {\left (3 \, d^{4} e^{2} f^{2} - d^{6} g^{2} + {\left (3 \, e^{6} f^{2} - d^{2} e^{4} g^{2}\right )} x^{4} - 2 \, {\left (3 \, d^{2} e^{4} f^{2} - d^{4} e^{2} g^{2}\right )} x^{2}\right )} \log \left (e x + d\right ) - {\left (3 \, d^{4} e^{2} f^{2} - d^{6} g^{2} + {\left (3 \, e^{6} f^{2} - d^{2} e^{4} g^{2}\right )} x^{4} - 2 \, {\left (3 \, d^{2} e^{4} f^{2} - d^{4} e^{2} g^{2}\right )} x^{2}\right )} \log \left (e x - d\right )}{16 \, {\left (d^{5} e^{7} x^{4} - 2 \, d^{7} e^{5} x^{2} + d^{9} e^{3}\right )}} \] Input:
integrate((g*x+f)^2/(-e^2*x^2+d^2)^3,x, algorithm="fricas")
Output:
1/16*(8*d^5*e*f*g - 2*(3*d*e^5*f^2 - d^3*e^3*g^2)*x^3 + 2*(5*d^3*e^3*f^2 + d^5*e*g^2)*x + (3*d^4*e^2*f^2 - d^6*g^2 + (3*e^6*f^2 - d^2*e^4*g^2)*x^4 - 2*(3*d^2*e^4*f^2 - d^4*e^2*g^2)*x^2)*log(e*x + d) - (3*d^4*e^2*f^2 - d^6* g^2 + (3*e^6*f^2 - d^2*e^4*g^2)*x^4 - 2*(3*d^2*e^4*f^2 - d^4*e^2*g^2)*x^2) *log(e*x - d))/(d^5*e^7*x^4 - 2*d^7*e^5*x^2 + d^9*e^3)
Time = 0.52 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.14 \[ \int \frac {(f+g x)^2}{\left (d^2-e^2 x^2\right )^3} \, dx=- \frac {- 4 d^{4} f g + x^{3} \left (- d^{2} e^{2} g^{2} + 3 e^{4} f^{2}\right ) + x \left (- d^{4} g^{2} - 5 d^{2} e^{2} f^{2}\right )}{8 d^{8} e^{2} - 16 d^{6} e^{4} x^{2} + 8 d^{4} e^{6} x^{4}} + \frac {\left (d^{2} g^{2} - 3 e^{2} f^{2}\right ) \log {\left (- \frac {d}{e} + x \right )}}{16 d^{5} e^{3}} - \frac {\left (d^{2} g^{2} - 3 e^{2} f^{2}\right ) \log {\left (\frac {d}{e} + x \right )}}{16 d^{5} e^{3}} \] Input:
integrate((g*x+f)**2/(-e**2*x**2+d**2)**3,x)
Output:
-(-4*d**4*f*g + x**3*(-d**2*e**2*g**2 + 3*e**4*f**2) + x*(-d**4*g**2 - 5*d **2*e**2*f**2))/(8*d**8*e**2 - 16*d**6*e**4*x**2 + 8*d**4*e**6*x**4) + (d* *2*g**2 - 3*e**2*f**2)*log(-d/e + x)/(16*d**5*e**3) - (d**2*g**2 - 3*e**2* f**2)*log(d/e + x)/(16*d**5*e**3)
Time = 0.03 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.21 \[ \int \frac {(f+g x)^2}{\left (d^2-e^2 x^2\right )^3} \, dx=\frac {4 \, d^{4} f g - {\left (3 \, e^{4} f^{2} - d^{2} e^{2} g^{2}\right )} x^{3} + {\left (5 \, d^{2} e^{2} f^{2} + d^{4} g^{2}\right )} x}{8 \, {\left (d^{4} e^{6} x^{4} - 2 \, d^{6} e^{4} x^{2} + d^{8} e^{2}\right )}} + \frac {{\left (3 \, e^{2} f^{2} - d^{2} g^{2}\right )} \log \left (e x + d\right )}{16 \, d^{5} e^{3}} - \frac {{\left (3 \, e^{2} f^{2} - d^{2} g^{2}\right )} \log \left (e x - d\right )}{16 \, d^{5} e^{3}} \] Input:
integrate((g*x+f)^2/(-e^2*x^2+d^2)^3,x, algorithm="maxima")
Output:
1/8*(4*d^4*f*g - (3*e^4*f^2 - d^2*e^2*g^2)*x^3 + (5*d^2*e^2*f^2 + d^4*g^2) *x)/(d^4*e^6*x^4 - 2*d^6*e^4*x^2 + d^8*e^2) + 1/16*(3*e^2*f^2 - d^2*g^2)*l og(e*x + d)/(d^5*e^3) - 1/16*(3*e^2*f^2 - d^2*g^2)*log(e*x - d)/(d^5*e^3)
Time = 0.17 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.16 \[ \int \frac {(f+g x)^2}{\left (d^2-e^2 x^2\right )^3} \, dx=-\frac {3 \, e^{4} f^{2} x^{3} - d^{2} e^{2} g^{2} x^{3} - 5 \, d^{2} e^{2} f^{2} x - d^{4} g^{2} x - 4 \, d^{4} f g}{8 \, {\left (e^{2} x^{2} - d^{2}\right )}^{2} d^{4} e^{2}} + \frac {{\left (3 \, e^{3} f^{2} - d^{2} e g^{2}\right )} \log \left ({\left | e x + d \right |}\right )}{16 \, d^{5} e^{4}} - \frac {{\left (3 \, e^{3} f^{2} - d^{2} e g^{2}\right )} \log \left ({\left | e x - d \right |}\right )}{16 \, d^{5} e^{4}} \] Input:
integrate((g*x+f)^2/(-e^2*x^2+d^2)^3,x, algorithm="giac")
Output:
-1/8*(3*e^4*f^2*x^3 - d^2*e^2*g^2*x^3 - 5*d^2*e^2*f^2*x - d^4*g^2*x - 4*d^ 4*f*g)/((e^2*x^2 - d^2)^2*d^4*e^2) + 1/16*(3*e^3*f^2 - d^2*e*g^2)*log(abs( e*x + d))/(d^5*e^4) - 1/16*(3*e^3*f^2 - d^2*e*g^2)*log(abs(e*x - d))/(d^5* e^4)
Time = 0.06 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.90 \[ \int \frac {(f+g x)^2}{\left (d^2-e^2 x^2\right )^3} \, dx=\frac {\frac {x^3\,\left (d^2\,g^2-3\,e^2\,f^2\right )}{8\,d^4}+\frac {f\,g}{2\,e^2}+\frac {x\,\left (d^2\,g^2+5\,e^2\,f^2\right )}{8\,d^2\,e^2}}{d^4-2\,d^2\,e^2\,x^2+e^4\,x^4}-\frac {\mathrm {atanh}\left (\frac {e\,x}{d}\right )\,\left (d^2\,g^2-3\,e^2\,f^2\right )}{8\,d^5\,e^3} \] Input:
int((f + g*x)^2/(d^2 - e^2*x^2)^3,x)
Output:
((x^3*(d^2*g^2 - 3*e^2*f^2))/(8*d^4) + (f*g)/(2*e^2) + (x*(d^2*g^2 + 5*e^2 *f^2))/(8*d^2*e^2))/(d^4 + e^4*x^4 - 2*d^2*e^2*x^2) - (atanh((e*x)/d)*(d^2 *g^2 - 3*e^2*f^2))/(8*d^5*e^3)
Time = 0.21 (sec) , antiderivative size = 327, normalized size of antiderivative = 2.60 \[ \int \frac {(f+g x)^2}{\left (d^2-e^2 x^2\right )^3} \, dx=\frac {-\mathrm {log}\left (-e x -d \right ) d^{6} g^{2}+3 \,\mathrm {log}\left (-e x -d \right ) d^{4} e^{2} f^{2}+2 \,\mathrm {log}\left (-e x -d \right ) d^{4} e^{2} g^{2} x^{2}-6 \,\mathrm {log}\left (-e x -d \right ) d^{2} e^{4} f^{2} x^{2}-\mathrm {log}\left (-e x -d \right ) d^{2} e^{4} g^{2} x^{4}+3 \,\mathrm {log}\left (-e x -d \right ) e^{6} f^{2} x^{4}+\mathrm {log}\left (-e x +d \right ) d^{6} g^{2}-3 \,\mathrm {log}\left (-e x +d \right ) d^{4} e^{2} f^{2}-2 \,\mathrm {log}\left (-e x +d \right ) d^{4} e^{2} g^{2} x^{2}+6 \,\mathrm {log}\left (-e x +d \right ) d^{2} e^{4} f^{2} x^{2}+\mathrm {log}\left (-e x +d \right ) d^{2} e^{4} g^{2} x^{4}-3 \,\mathrm {log}\left (-e x +d \right ) e^{6} f^{2} x^{4}+8 d^{5} e f g +2 d^{5} e \,g^{2} x +10 d^{3} e^{3} f^{2} x +2 d^{3} e^{3} g^{2} x^{3}-6 d \,e^{5} f^{2} x^{3}}{16 d^{5} e^{3} \left (e^{4} x^{4}-2 d^{2} e^{2} x^{2}+d^{4}\right )} \] Input:
int((g*x+f)^2/(-e^2*x^2+d^2)^3,x)
Output:
( - log( - d - e*x)*d**6*g**2 + 3*log( - d - e*x)*d**4*e**2*f**2 + 2*log( - d - e*x)*d**4*e**2*g**2*x**2 - 6*log( - d - e*x)*d**2*e**4*f**2*x**2 - l og( - d - e*x)*d**2*e**4*g**2*x**4 + 3*log( - d - e*x)*e**6*f**2*x**4 + lo g(d - e*x)*d**6*g**2 - 3*log(d - e*x)*d**4*e**2*f**2 - 2*log(d - e*x)*d**4 *e**2*g**2*x**2 + 6*log(d - e*x)*d**2*e**4*f**2*x**2 + log(d - e*x)*d**2*e **4*g**2*x**4 - 3*log(d - e*x)*e**6*f**2*x**4 + 8*d**5*e*f*g + 2*d**5*e*g* *2*x + 10*d**3*e**3*f**2*x + 2*d**3*e**3*g**2*x**3 - 6*d*e**5*f**2*x**3)/( 16*d**5*e**3*(d**4 - 2*d**2*e**2*x**2 + e**4*x**4))