\(\int \frac {a+b x+c x^2}{x^3 \sqrt {1-d x} \sqrt {1+d x}} \, dx\) [6]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [C] (verified)
Fricas [A] (verification not implemented)
Sympy [F(-1)]
Maxima [A] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 33, antiderivative size = 71 \[ \int \frac {a+b x+c x^2}{x^3 \sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {a \sqrt {1-d^2 x^2}}{2 x^2}-\frac {b \sqrt {1-d^2 x^2}}{x}-\frac {1}{2} \left (2 c+a d^2\right ) \text {arctanh}\left (\sqrt {1-d^2 x^2}\right ) \] Output:

-1/2*a*(-d^2*x^2+1)^(1/2)/x^2-b*(-d^2*x^2+1)^(1/2)/x-1/2*(a*d^2+2*c)*arcta 
nh((-d^2*x^2+1)^(1/2))
 

Mathematica [A] (verified)

Time = 0.20 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.99 \[ \int \frac {a+b x+c x^2}{x^3 \sqrt {1-d x} \sqrt {1+d x}} \, dx=\frac {1}{2} \left (-\frac {(a+2 b x) \sqrt {1-d^2 x^2}}{x^2}-\left (2 c+a d^2\right ) \log (x)+\left (2 c+a d^2\right ) \log \left (-1+\sqrt {1-d^2 x^2}\right )\right ) \] Input:

Integrate[(a + b*x + c*x^2)/(x^3*Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]
 

Output:

(-(((a + 2*b*x)*Sqrt[1 - d^2*x^2])/x^2) - (2*c + a*d^2)*Log[x] + (2*c + a* 
d^2)*Log[-1 + Sqrt[1 - d^2*x^2]])/2
 

Rubi [A] (verified)

Time = 0.41 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.04, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {2112, 2338, 25, 534, 243, 73, 221}

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 {a+b x+c x^2}{x^3 \sqrt {1-d x} \sqrt {d x+1}} \, dx\)

\(\Big \downarrow \) 2112

\(\displaystyle \int \frac {a+b x+c x^2}{x^3 \sqrt {1-d^2 x^2}}dx\)

\(\Big \downarrow \) 2338

\(\displaystyle -\frac {1}{2} \int -\frac {2 b+\left (a d^2+2 c\right ) x}{x^2 \sqrt {1-d^2 x^2}}dx-\frac {a \sqrt {1-d^2 x^2}}{2 x^2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{2} \int \frac {2 b+\left (a d^2+2 c\right ) x}{x^2 \sqrt {1-d^2 x^2}}dx-\frac {a \sqrt {1-d^2 x^2}}{2 x^2}\)

\(\Big \downarrow \) 534

\(\displaystyle \frac {1}{2} \left (\left (a d^2+2 c\right ) \int \frac {1}{x \sqrt {1-d^2 x^2}}dx-\frac {2 b \sqrt {1-d^2 x^2}}{x}\right )-\frac {a \sqrt {1-d^2 x^2}}{2 x^2}\)

\(\Big \downarrow \) 243

\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \left (a d^2+2 c\right ) \int \frac {1}{x^2 \sqrt {1-d^2 x^2}}dx^2-\frac {2 b \sqrt {1-d^2 x^2}}{x}\right )-\frac {a \sqrt {1-d^2 x^2}}{2 x^2}\)

\(\Big \downarrow \) 73

\(\displaystyle \frac {1}{2} \left (-\frac {\left (a d^2+2 c\right ) \int \frac {1}{\frac {1}{d^2}-\frac {x^4}{d^2}}d\sqrt {1-d^2 x^2}}{d^2}-\frac {2 b \sqrt {1-d^2 x^2}}{x}\right )-\frac {a \sqrt {1-d^2 x^2}}{2 x^2}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {1}{2} \left (-\left (a d^2+2 c\right ) \text {arctanh}\left (\sqrt {1-d^2 x^2}\right )-\frac {2 b \sqrt {1-d^2 x^2}}{x}\right )-\frac {a \sqrt {1-d^2 x^2}}{2 x^2}\)

Input:

Int[(a + b*x + c*x^2)/(x^3*Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]
 

Output:

-1/2*(a*Sqrt[1 - d^2*x^2])/x^2 + ((-2*b*Sqrt[1 - d^2*x^2])/x - (2*c + a*d^ 
2)*ArcTanh[Sqrt[1 - d^2*x^2]])/2
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

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

rule 243
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[1/2   Subst[In 
t[x^((m - 1)/2)*(a + b*x)^p, x], x, x^2], x] /; FreeQ[{a, b, m, p}, x] && I 
ntegerQ[(m - 1)/2]
 

rule 534
Int[(x_)^(m_)*((c_) + (d_.)*(x_))*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> 
Simp[(-c)*x^(m + 1)*((a + b*x^2)^(p + 1)/(2*a*(p + 1))), x] + Simp[d   Int[ 
x^(m + 1)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, m, p}, x] && ILtQ[m, 
0] && GtQ[p, -1] && EqQ[m + 2*p + 3, 0]
 

rule 2112
Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f 
_.)*(x_))^(p_.), x_Symbol] :> Int[Px*(a*c + b*d*x^2)^m*(e + f*x)^p, x] /; F 
reeQ[{a, b, c, d, e, f, m, n, p}, x] && PolyQ[Px, x] && EqQ[b*c + a*d, 0] & 
& EqQ[m, n] && (IntegerQ[m] || (GtQ[a, 0] && GtQ[c, 0]))
 

rule 2338
Int[(Pq_)*((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{ 
Q = PolynomialQuotient[Pq, c*x, x], R = PolynomialRemainder[Pq, c*x, x]}, S 
imp[R*(c*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*c*(m + 1))), x] + Simp[1/(a*c*( 
m + 1))   Int[(c*x)^(m + 1)*(a + b*x^2)^p*ExpandToSum[a*c*(m + 1)*Q - b*R*( 
m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && Lt 
Q[m, -1] && (IntegerQ[2*p] || NeQ[Expon[Pq, x], 1])
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.64 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.52

method result size
default \(-\frac {\sqrt {-x d +1}\, \sqrt {x d +1}\, \operatorname {csgn}\left (d \right )^{2} \left (\operatorname {arctanh}\left (\frac {1}{\sqrt {-d^{2} x^{2}+1}}\right ) a \,d^{2} x^{2}+2 \,\operatorname {arctanh}\left (\frac {1}{\sqrt {-d^{2} x^{2}+1}}\right ) c \,x^{2}+2 \sqrt {-d^{2} x^{2}+1}\, b x +\sqrt {-d^{2} x^{2}+1}\, a \right )}{2 \sqrt {-d^{2} x^{2}+1}\, x^{2}}\) \(108\)
risch \(\frac {\sqrt {x d +1}\, \left (x d -1\right ) \left (2 b x +a \right ) \sqrt {\left (-x d +1\right ) \left (x d +1\right )}}{2 x^{2} \sqrt {-\left (x d +1\right ) \left (x d -1\right )}\, \sqrt {-x d +1}}-\frac {\left (c +\frac {a \,d^{2}}{2}\right ) \operatorname {arctanh}\left (\frac {1}{\sqrt {-d^{2} x^{2}+1}}\right ) \sqrt {\left (-x d +1\right ) \left (x d +1\right )}}{\sqrt {-x d +1}\, \sqrt {x d +1}}\) \(113\)

Input:

int((c*x^2+b*x+a)/x^3/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x,method=_RETURNVERBOSE 
)
 

Output:

-1/2*(-d*x+1)^(1/2)*(d*x+1)^(1/2)*csgn(d)^2*(arctanh(1/(-d^2*x^2+1)^(1/2)) 
*a*d^2*x^2+2*arctanh(1/(-d^2*x^2+1)^(1/2))*c*x^2+2*(-d^2*x^2+1)^(1/2)*b*x+ 
(-d^2*x^2+1)^(1/2)*a)/(-d^2*x^2+1)^(1/2)/x^2
 

Fricas [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.92 \[ \int \frac {a+b x+c x^2}{x^3 \sqrt {1-d x} \sqrt {1+d x}} \, dx=\frac {{\left (a d^{2} + 2 \, c\right )} x^{2} \log \left (\frac {\sqrt {d x + 1} \sqrt {-d x + 1} - 1}{x}\right ) - {\left (2 \, b x + a\right )} \sqrt {d x + 1} \sqrt {-d x + 1}}{2 \, x^{2}} \] Input:

integrate((c*x^2+b*x+a)/x^3/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="fri 
cas")
 

Output:

1/2*((a*d^2 + 2*c)*x^2*log((sqrt(d*x + 1)*sqrt(-d*x + 1) - 1)/x) - (2*b*x 
+ a)*sqrt(d*x + 1)*sqrt(-d*x + 1))/x^2
 

Sympy [F(-1)]

Timed out. \[ \int \frac {a+b x+c x^2}{x^3 \sqrt {1-d x} \sqrt {1+d x}} \, dx=\text {Timed out} \] Input:

integrate((c*x**2+b*x+a)/x**3/(-d*x+1)**(1/2)/(d*x+1)**(1/2),x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.38 \[ \int \frac {a+b x+c x^2}{x^3 \sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {1}{2} \, a d^{2} \log \left (\frac {2 \, \sqrt {-d^{2} x^{2} + 1}}{{\left | x \right |}} + \frac {2}{{\left | x \right |}}\right ) - c \log \left (\frac {2 \, \sqrt {-d^{2} x^{2} + 1}}{{\left | x \right |}} + \frac {2}{{\left | x \right |}}\right ) - \frac {\sqrt {-d^{2} x^{2} + 1} b}{x} - \frac {\sqrt {-d^{2} x^{2} + 1} a}{2 \, x^{2}} \] Input:

integrate((c*x^2+b*x+a)/x^3/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="max 
ima")
 

Output:

-1/2*a*d^2*log(2*sqrt(-d^2*x^2 + 1)/abs(x) + 2/abs(x)) - c*log(2*sqrt(-d^2 
*x^2 + 1)/abs(x) + 2/abs(x)) - sqrt(-d^2*x^2 + 1)*b/x - 1/2*sqrt(-d^2*x^2 
+ 1)*a/x^2
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 407 vs. \(2 (61) = 122\).

Time = 0.21 (sec) , antiderivative size = 407, normalized size of antiderivative = 5.73 \[ \int \frac {a+b x+c x^2}{x^3 \sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {{\left (a d^{3} + 2 \, c d\right )} \log \left ({\left | -\frac {\sqrt {2} - \sqrt {-d x + 1}}{\sqrt {d x + 1}} + \frac {\sqrt {d x + 1}}{\sqrt {2} - \sqrt {-d x + 1}} + 2 \right |}\right ) - {\left (a d^{3} + 2 \, c d\right )} \log \left ({\left | -\frac {\sqrt {2} - \sqrt {-d x + 1}}{\sqrt {d x + 1}} + \frac {\sqrt {d x + 1}}{\sqrt {2} - \sqrt {-d x + 1}} - 2 \right |}\right ) - \frac {4 \, {\left (a d^{3} {\left (\frac {\sqrt {2} - \sqrt {-d x + 1}}{\sqrt {d x + 1}} - \frac {\sqrt {d x + 1}}{\sqrt {2} - \sqrt {-d x + 1}}\right )}^{3} - 2 \, b d^{2} {\left (\frac {\sqrt {2} - \sqrt {-d x + 1}}{\sqrt {d x + 1}} - \frac {\sqrt {d x + 1}}{\sqrt {2} - \sqrt {-d x + 1}}\right )}^{3} + 4 \, a d^{3} {\left (\frac {\sqrt {2} - \sqrt {-d x + 1}}{\sqrt {d x + 1}} - \frac {\sqrt {d x + 1}}{\sqrt {2} - \sqrt {-d x + 1}}\right )} + 8 \, b d^{2} {\left (\frac {\sqrt {2} - \sqrt {-d x + 1}}{\sqrt {d x + 1}} - \frac {\sqrt {d x + 1}}{\sqrt {2} - \sqrt {-d x + 1}}\right )}\right )}}{{\left ({\left (\frac {\sqrt {2} - \sqrt {-d x + 1}}{\sqrt {d x + 1}} - \frac {\sqrt {d x + 1}}{\sqrt {2} - \sqrt {-d x + 1}}\right )}^{2} - 4\right )}^{2}}}{2 \, d} \] Input:

integrate((c*x^2+b*x+a)/x^3/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="gia 
c")
 

Output:

-1/2*((a*d^3 + 2*c*d)*log(abs(-(sqrt(2) - sqrt(-d*x + 1))/sqrt(d*x + 1) + 
sqrt(d*x + 1)/(sqrt(2) - sqrt(-d*x + 1)) + 2)) - (a*d^3 + 2*c*d)*log(abs(- 
(sqrt(2) - sqrt(-d*x + 1))/sqrt(d*x + 1) + sqrt(d*x + 1)/(sqrt(2) - sqrt(- 
d*x + 1)) - 2)) - 4*(a*d^3*((sqrt(2) - sqrt(-d*x + 1))/sqrt(d*x + 1) - sqr 
t(d*x + 1)/(sqrt(2) - sqrt(-d*x + 1)))^3 - 2*b*d^2*((sqrt(2) - sqrt(-d*x + 
 1))/sqrt(d*x + 1) - sqrt(d*x + 1)/(sqrt(2) - sqrt(-d*x + 1)))^3 + 4*a*d^3 
*((sqrt(2) - sqrt(-d*x + 1))/sqrt(d*x + 1) - sqrt(d*x + 1)/(sqrt(2) - sqrt 
(-d*x + 1))) + 8*b*d^2*((sqrt(2) - sqrt(-d*x + 1))/sqrt(d*x + 1) - sqrt(d* 
x + 1)/(sqrt(2) - sqrt(-d*x + 1))))/(((sqrt(2) - sqrt(-d*x + 1))/sqrt(d*x 
+ 1) - sqrt(d*x + 1)/(sqrt(2) - sqrt(-d*x + 1)))^2 - 4)^2)/d
 

Mupad [B] (verification not implemented)

Time = 5.59 (sec) , antiderivative size = 312, normalized size of antiderivative = 4.39 \[ \int \frac {a+b x+c x^2}{x^3 \sqrt {1-d x} \sqrt {1+d x}} \, dx=c\,\left (\ln \left (\frac {{\left (\sqrt {1-d\,x}-1\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}-1\right )-\ln \left (\frac {\sqrt {1-d\,x}-1}{\sqrt {d\,x+1}-1}\right )\right )-\frac {\frac {a\,d^2\,{\left (\sqrt {1-d\,x}-1\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}-\frac {a\,d^2}{2}+\frac {15\,a\,d^2\,{\left (\sqrt {1-d\,x}-1\right )}^4}{2\,{\left (\sqrt {d\,x+1}-1\right )}^4}}{\frac {16\,{\left (\sqrt {1-d\,x}-1\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}-\frac {32\,{\left (\sqrt {1-d\,x}-1\right )}^4}{{\left (\sqrt {d\,x+1}-1\right )}^4}+\frac {16\,{\left (\sqrt {1-d\,x}-1\right )}^6}{{\left (\sqrt {d\,x+1}-1\right )}^6}}+\frac {a\,d^2\,\ln \left (\frac {{\left (\sqrt {1-d\,x}-1\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}-1\right )}{2}-\frac {a\,d^2\,\ln \left (\frac {\sqrt {1-d\,x}-1}{\sqrt {d\,x+1}-1}\right )}{2}-\frac {b\,\sqrt {1-d\,x}\,\sqrt {d\,x+1}}{x}+\frac {a\,d^2\,{\left (\sqrt {1-d\,x}-1\right )}^2}{32\,{\left (\sqrt {d\,x+1}-1\right )}^2} \] Input:

int((a + b*x + c*x^2)/(x^3*(1 - d*x)^(1/2)*(d*x + 1)^(1/2)),x)
 

Output:

c*(log(((1 - d*x)^(1/2) - 1)^2/((d*x + 1)^(1/2) - 1)^2 - 1) - log(((1 - d* 
x)^(1/2) - 1)/((d*x + 1)^(1/2) - 1))) - ((a*d^2*((1 - d*x)^(1/2) - 1)^2)/( 
(d*x + 1)^(1/2) - 1)^2 - (a*d^2)/2 + (15*a*d^2*((1 - d*x)^(1/2) - 1)^4)/(2 
*((d*x + 1)^(1/2) - 1)^4))/((16*((1 - d*x)^(1/2) - 1)^2)/((d*x + 1)^(1/2) 
- 1)^2 - (32*((1 - d*x)^(1/2) - 1)^4)/((d*x + 1)^(1/2) - 1)^4 + (16*((1 - 
d*x)^(1/2) - 1)^6)/((d*x + 1)^(1/2) - 1)^6) + (a*d^2*log(((1 - d*x)^(1/2) 
- 1)^2/((d*x + 1)^(1/2) - 1)^2 - 1))/2 - (a*d^2*log(((1 - d*x)^(1/2) - 1)/ 
((d*x + 1)^(1/2) - 1)))/2 - (b*(1 - d*x)^(1/2)*(d*x + 1)^(1/2))/x + (a*d^2 
*((1 - d*x)^(1/2) - 1)^2)/(32*((d*x + 1)^(1/2) - 1)^2)
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 273, normalized size of antiderivative = 3.85 \[ \int \frac {a+b x+c x^2}{x^3 \sqrt {1-d x} \sqrt {1+d x}} \, dx=\frac {-\sqrt {d x +1}\, \sqrt {-d x +1}\, a -2 \sqrt {d x +1}\, \sqrt {-d x +1}\, b x -\mathrm {log}\left (-\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )-1\right ) a \,d^{2} x^{2}-2 \,\mathrm {log}\left (-\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )-1\right ) c \,x^{2}+\mathrm {log}\left (-\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )+1\right ) a \,d^{2} x^{2}+2 \,\mathrm {log}\left (-\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )+1\right ) c \,x^{2}-\mathrm {log}\left (\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )-1\right ) a \,d^{2} x^{2}-2 \,\mathrm {log}\left (\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )-1\right ) c \,x^{2}+\mathrm {log}\left (\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )+1\right ) a \,d^{2} x^{2}+2 \,\mathrm {log}\left (\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +1}}{\sqrt {2}}\right )}{2}\right )+1\right ) c \,x^{2}}{2 x^{2}} \] Input:

int((c*x^2+b*x+a)/x^3/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x)
 

Output:

( - sqrt(d*x + 1)*sqrt( - d*x + 1)*a - 2*sqrt(d*x + 1)*sqrt( - d*x + 1)*b* 
x - log( - sqrt(2) + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) - 1)*a*d**2*x** 
2 - 2*log( - sqrt(2) + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) - 1)*c*x**2 + 
 log( - sqrt(2) + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) + 1)*a*d**2*x**2 + 
 2*log( - sqrt(2) + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) + 1)*c*x**2 - lo 
g(sqrt(2) + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) - 1)*a*d**2*x**2 - 2*log 
(sqrt(2) + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) - 1)*c*x**2 + log(sqrt(2) 
 + tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) + 1)*a*d**2*x**2 + 2*log(sqrt(2) 
+ tan(asin(sqrt( - d*x + 1)/sqrt(2))/2) + 1)*c*x**2)/(2*x**2)