3.507 \(\int \frac{a+b \sin (d+e x)}{(b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x))^{3/2}} \, dx\)

Optimal. Leaf size=239 \[ \frac{b \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^3}{2 e \left (a^2-b^2\right ) \left (a^3 b+a^4 \sin (d+e x)\right ) \left (a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2\right )^{3/2}}-\frac{\cos (d+e x) (a \sin (d+e x)+b)}{2 e \left (a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2\right )^{3/2}}-\frac{\left (a^2 \sin (d+e x)+a b\right )^3 \tanh ^{-1}\left (\frac{a+b \tan \left (\frac{1}{2} (d+e x)\right )}{\sqrt{a^2-b^2}}\right )}{a^2 e \left (a^2-b^2\right )^{3/2} \left (a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2\right )^{3/2}} \]

[Out]

-(Cos[d + e*x]*(b + a*Sin[d + e*x]))/(2*e*(b^2 + 2*a*b*Sin[d + e*x] + a^2*Sin[d + e*x]^2)^(3/2)) - (ArcTanh[(a
 + b*Tan[(d + e*x)/2])/Sqrt[a^2 - b^2]]*(a*b + a^2*Sin[d + e*x])^3)/(a^2*(a^2 - b^2)^(3/2)*e*(b^2 + 2*a*b*Sin[
d + e*x] + a^2*Sin[d + e*x]^2)^(3/2)) + (b*Cos[d + e*x]*(a*b + a^2*Sin[d + e*x])^3)/(2*(a^2 - b^2)*e*(a^3*b +
a^4*Sin[d + e*x])*(b^2 + 2*a*b*Sin[d + e*x] + a^2*Sin[d + e*x]^2)^(3/2))

________________________________________________________________________________________

Rubi [A]  time = 0.271869, antiderivative size = 239, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.146, Rules used = {3290, 2754, 12, 2660, 618, 206} \[ \frac{b \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^3}{2 e \left (a^2-b^2\right ) \left (a^3 b+a^4 \sin (d+e x)\right ) \left (a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2\right )^{3/2}}-\frac{\cos (d+e x) (a \sin (d+e x)+b)}{2 e \left (a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2\right )^{3/2}}-\frac{\left (a^2 \sin (d+e x)+a b\right )^3 \tanh ^{-1}\left (\frac{a+b \tan \left (\frac{1}{2} (d+e x)\right )}{\sqrt{a^2-b^2}}\right )}{a^2 e \left (a^2-b^2\right )^{3/2} \left (a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2\right )^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sin[d + e*x])/(b^2 + 2*a*b*Sin[d + e*x] + a^2*Sin[d + e*x]^2)^(3/2),x]

[Out]

-(Cos[d + e*x]*(b + a*Sin[d + e*x]))/(2*e*(b^2 + 2*a*b*Sin[d + e*x] + a^2*Sin[d + e*x]^2)^(3/2)) - (ArcTanh[(a
 + b*Tan[(d + e*x)/2])/Sqrt[a^2 - b^2]]*(a*b + a^2*Sin[d + e*x])^3)/(a^2*(a^2 - b^2)^(3/2)*e*(b^2 + 2*a*b*Sin[
d + e*x] + a^2*Sin[d + e*x]^2)^(3/2)) + (b*Cos[d + e*x]*(a*b + a^2*Sin[d + e*x])^3)/(2*(a^2 - b^2)*e*(a^3*b +
a^4*Sin[d + e*x])*(b^2 + 2*a*b*Sin[d + e*x] + a^2*Sin[d + e*x]^2)^(3/2))

Rule 3290

Int[((A_) + (B_.)*sin[(d_.) + (e_.)*(x_)])*((a_) + (b_.)*sin[(d_.) + (e_.)*(x_)] + (c_.)*sin[(d_.) + (e_.)*(x_
)]^2)^(n_), x_Symbol] :> Dist[(a + b*Sin[d + e*x] + c*Sin[d + e*x]^2)^n/(b + 2*c*Sin[d + e*x])^(2*n), Int[(A +
 B*Sin[d + e*x])*(b + 2*c*Sin[d + e*x])^(2*n), x], x] /; FreeQ[{a, b, c, d, e, A, B}, x] && EqQ[b^2 - 4*a*c, 0
] &&  !IntegerQ[n]

Rule 2754

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[((
b*c - a*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(f*(m + 1)*(a^2 - b^2)), x] + Dist[1/((m + 1)*(a^2 - b^2
)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[(a*c - b*d)*(m + 1) - (b*c - a*d)*(m + 2)*Sin[e + f*x], x], x], x] /
; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegerQ[2*m]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 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 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])

Rubi steps

\begin{align*} \int \frac{a+b \sin (d+e x)}{\left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}} \, dx &=\frac{\left (2 a b+2 a^2 \sin (d+e x)\right )^3 \int \frac{a+b \sin (d+e x)}{\left (2 a b+2 a^2 \sin (d+e x)\right )^3} \, dx}{\left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}\\ &=-\frac{\cos (d+e x) (b+a \sin (d+e x))}{2 e \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}+\frac{\left (2 a b+2 a^2 \sin (d+e x)\right )^3 \int \frac{2 a \left (a^2-b^2\right ) \sin (d+e x)}{\left (2 a b+2 a^2 \sin (d+e x)\right )^2} \, dx}{8 a^2 \left (a^2-b^2\right ) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}\\ &=-\frac{\cos (d+e x) (b+a \sin (d+e x))}{2 e \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}+\frac{\left (2 a b+2 a^2 \sin (d+e x)\right )^3 \int \frac{\sin (d+e x)}{\left (2 a b+2 a^2 \sin (d+e x)\right )^2} \, dx}{4 a \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}\\ &=-\frac{\cos (d+e x) (b+a \sin (d+e x))}{2 e \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}+\frac{b \cos (d+e x) \left (a b+a^2 \sin (d+e x)\right )^3}{2 \left (a^2-b^2\right ) e \left (a^3 b+a^4 \sin (d+e x)\right ) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}+\frac{\left (2 a b+2 a^2 \sin (d+e x)\right )^3 \int \frac{2 a^2}{2 a b+2 a^2 \sin (d+e x)} \, dx}{16 a^3 \left (a^2-b^2\right ) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}\\ &=-\frac{\cos (d+e x) (b+a \sin (d+e x))}{2 e \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}+\frac{b \cos (d+e x) \left (a b+a^2 \sin (d+e x)\right )^3}{2 \left (a^2-b^2\right ) e \left (a^3 b+a^4 \sin (d+e x)\right ) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}+\frac{\left (2 a b+2 a^2 \sin (d+e x)\right )^3 \int \frac{1}{2 a b+2 a^2 \sin (d+e x)} \, dx}{8 a \left (a^2-b^2\right ) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}\\ &=-\frac{\cos (d+e x) (b+a \sin (d+e x))}{2 e \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}+\frac{b \cos (d+e x) \left (a b+a^2 \sin (d+e x)\right )^3}{2 \left (a^2-b^2\right ) e \left (a^3 b+a^4 \sin (d+e x)\right ) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}+\frac{\left (2 a b+2 a^2 \sin (d+e x)\right )^3 \operatorname{Subst}\left (\int \frac{1}{2 a b+4 a^2 x+2 a b x^2} \, dx,x,\tan \left (\frac{1}{2} (d+e x)\right )\right )}{4 a \left (a^2-b^2\right ) e \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}\\ &=-\frac{\cos (d+e x) (b+a \sin (d+e x))}{2 e \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}+\frac{b \cos (d+e x) \left (a b+a^2 \sin (d+e x)\right )^3}{2 \left (a^2-b^2\right ) e \left (a^3 b+a^4 \sin (d+e x)\right ) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}-\frac{\left (2 a b+2 a^2 \sin (d+e x)\right )^3 \operatorname{Subst}\left (\int \frac{1}{16 a^2 \left (a^2-b^2\right )-x^2} \, dx,x,4 a^2+4 a b \tan \left (\frac{1}{2} (d+e x)\right )\right )}{2 a \left (a^2-b^2\right ) e \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}\\ &=-\frac{\cos (d+e x) (b+a \sin (d+e x))}{2 e \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}-\frac{\tanh ^{-1}\left (\frac{a+b \tan \left (\frac{1}{2} (d+e x)\right )}{\sqrt{a^2-b^2}}\right ) \left (a b+a^2 \sin (d+e x)\right )^3}{a^2 \left (a^2-b^2\right )^{3/2} e \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}+\frac{b \cos (d+e x) \left (a b+a^2 \sin (d+e x)\right )^3}{2 \left (a^2-b^2\right ) e \left (a^3 b+a^4 \sin (d+e x)\right ) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^{3/2}}\\ \end{align*}

Mathematica [A]  time = 0.352519, size = 144, normalized size = 0.6 \[ \frac{\sqrt{b^2-a^2} \cos (d+e x) \left (a^2-a b \sin (d+e x)-2 b^2\right )-2 a (a \sin (d+e x)+b)^2 \tan ^{-1}\left (\frac{a+b \tan \left (\frac{1}{2} (d+e x)\right )}{\sqrt{b^2-a^2}}\right )}{2 e (b-a) (a+b) \sqrt{b^2-a^2} (a \sin (d+e x)+b) \sqrt{(a \sin (d+e x)+b)^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sin[d + e*x])/(b^2 + 2*a*b*Sin[d + e*x] + a^2*Sin[d + e*x]^2)^(3/2),x]

[Out]

(-2*a*ArcTan[(a + b*Tan[(d + e*x)/2])/Sqrt[-a^2 + b^2]]*(b + a*Sin[d + e*x])^2 + Sqrt[-a^2 + b^2]*Cos[d + e*x]
*(a^2 - 2*b^2 - a*b*Sin[d + e*x]))/(2*(-a + b)*(a + b)*Sqrt[-a^2 + b^2]*e*(b + a*Sin[d + e*x])*Sqrt[(b + a*Sin
[d + e*x])^2])

________________________________________________________________________________________

Maple [B]  time = 0.153, size = 738, normalized size = 3.1 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sin(e*x+d))/(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^(3/2),x)

[Out]

-1/2/e/(-a^2+b^2)^(1/2)/(a^2-b^2)/b^2*(-2*cos(e*x+d)^2*sin(e*x+d)*arctan((b*cos(e*x+d)-a*sin(e*x+d)-b)/sin(e*x
+d)/(-a^2+b^2)^(1/2))*a^4*b^2+cos(e*x+d)^3*(-a^2+b^2)^(1/2)*a^2*b^3-cos(e*x+d)^2*sin(e*x+d)*(-a^2+b^2)^(1/2)*a
^5+2*cos(e*x+d)^2*sin(e*x+d)*(-a^2+b^2)^(1/2)*a^3*b^2-6*cos(e*x+d)^2*arctan((b*cos(e*x+d)-a*sin(e*x+d)-b)/sin(
e*x+d)/(-a^2+b^2)^(1/2))*a^3*b^3-3*cos(e*x+d)^2*(-a^2+b^2)^(1/2)*a^4*b+6*cos(e*x+d)^2*(-a^2+b^2)^(1/2)*a^2*b^3
+cos(e*x+d)*sin(e*x+d)*(-a^2+b^2)^(1/2)*a^3*b^2-3*cos(e*x+d)*sin(e*x+d)*(-a^2+b^2)^(1/2)*a*b^4+2*sin(e*x+d)*ar
ctan((b*cos(e*x+d)-a*sin(e*x+d)-b)/sin(e*x+d)/(-a^2+b^2)^(1/2))*a^4*b^2+6*sin(e*x+d)*arctan((b*cos(e*x+d)-a*si
n(e*x+d)-b)/sin(e*x+d)/(-a^2+b^2)^(1/2))*a^2*b^4-2*cos(e*x+d)*(-a^2+b^2)^(1/2)*b^5+sin(e*x+d)*(-a^2+b^2)^(1/2)
*a^5+sin(e*x+d)*(-a^2+b^2)^(1/2)*a^3*b^2-6*sin(e*x+d)*(-a^2+b^2)^(1/2)*a*b^4+6*arctan((b*cos(e*x+d)-a*sin(e*x+
d)-b)/sin(e*x+d)/(-a^2+b^2)^(1/2))*a^3*b^3+2*arctan((b*cos(e*x+d)-a*sin(e*x+d)-b)/sin(e*x+d)/(-a^2+b^2)^(1/2))
*a*b^5+3*(-a^2+b^2)^(1/2)*a^4*b-5*(-a^2+b^2)^(1/2)*a^2*b^3-2*(-a^2+b^2)^(1/2)*b^5)/(-a^2*cos(e*x+d)^2+2*a*b*si
n(e*x+d)+a^2+b^2)^(3/2)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(e*x+d))/(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^(3/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.10839, size = 1170, normalized size = 4.9 \begin{align*} \left [-\frac{2 \,{\left (a^{3} b - a b^{3}\right )} \cos \left (e x + d\right ) \sin \left (e x + d\right ) +{\left (a^{3} \cos \left (e x + d\right )^{2} - 2 \, a^{2} b \sin \left (e x + d\right ) - a^{3} - a b^{2}\right )} \sqrt{a^{2} - b^{2}} \log \left (\frac{{\left (a^{2} - 2 \, b^{2}\right )} \cos \left (e x + d\right )^{2} + 2 \, a b \sin \left (e x + d\right ) + a^{2} + b^{2} + 2 \,{\left (b \cos \left (e x + d\right ) \sin \left (e x + d\right ) + a \cos \left (e x + d\right )\right )} \sqrt{a^{2} - b^{2}}}{a^{2} \cos \left (e x + d\right )^{2} - 2 \, a b \sin \left (e x + d\right ) - a^{2} - b^{2}}\right ) - 2 \,{\left (a^{4} - 3 \, a^{2} b^{2} + 2 \, b^{4}\right )} \cos \left (e x + d\right )}{4 \,{\left ({\left (a^{6} - 2 \, a^{4} b^{2} + a^{2} b^{4}\right )} e \cos \left (e x + d\right )^{2} - 2 \,{\left (a^{5} b - 2 \, a^{3} b^{3} + a b^{5}\right )} e \sin \left (e x + d\right ) -{\left (a^{6} - a^{4} b^{2} - a^{2} b^{4} + b^{6}\right )} e\right )}}, -\frac{{\left (a^{3} b - a b^{3}\right )} \cos \left (e x + d\right ) \sin \left (e x + d\right ) +{\left (a^{3} \cos \left (e x + d\right )^{2} - 2 \, a^{2} b \sin \left (e x + d\right ) - a^{3} - a b^{2}\right )} \sqrt{-a^{2} + b^{2}} \arctan \left (-\frac{\sqrt{-a^{2} + b^{2}}{\left (b \sin \left (e x + d\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \cos \left (e x + d\right )}\right ) -{\left (a^{4} - 3 \, a^{2} b^{2} + 2 \, b^{4}\right )} \cos \left (e x + d\right )}{2 \,{\left ({\left (a^{6} - 2 \, a^{4} b^{2} + a^{2} b^{4}\right )} e \cos \left (e x + d\right )^{2} - 2 \,{\left (a^{5} b - 2 \, a^{3} b^{3} + a b^{5}\right )} e \sin \left (e x + d\right ) -{\left (a^{6} - a^{4} b^{2} - a^{2} b^{4} + b^{6}\right )} e\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(e*x+d))/(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^(3/2),x, algorithm="fricas")

[Out]

[-1/4*(2*(a^3*b - a*b^3)*cos(e*x + d)*sin(e*x + d) + (a^3*cos(e*x + d)^2 - 2*a^2*b*sin(e*x + d) - a^3 - a*b^2)
*sqrt(a^2 - b^2)*log(((a^2 - 2*b^2)*cos(e*x + d)^2 + 2*a*b*sin(e*x + d) + a^2 + b^2 + 2*(b*cos(e*x + d)*sin(e*
x + d) + a*cos(e*x + d))*sqrt(a^2 - b^2))/(a^2*cos(e*x + d)^2 - 2*a*b*sin(e*x + d) - a^2 - b^2)) - 2*(a^4 - 3*
a^2*b^2 + 2*b^4)*cos(e*x + d))/((a^6 - 2*a^4*b^2 + a^2*b^4)*e*cos(e*x + d)^2 - 2*(a^5*b - 2*a^3*b^3 + a*b^5)*e
*sin(e*x + d) - (a^6 - a^4*b^2 - a^2*b^4 + b^6)*e), -1/2*((a^3*b - a*b^3)*cos(e*x + d)*sin(e*x + d) + (a^3*cos
(e*x + d)^2 - 2*a^2*b*sin(e*x + d) - a^3 - a*b^2)*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*sin(e*x + d) +
a)/((a^2 - b^2)*cos(e*x + d))) - (a^4 - 3*a^2*b^2 + 2*b^4)*cos(e*x + d))/((a^6 - 2*a^4*b^2 + a^2*b^4)*e*cos(e*
x + d)^2 - 2*(a^5*b - 2*a^3*b^3 + a*b^5)*e*sin(e*x + d) - (a^6 - a^4*b^2 - a^2*b^4 + b^6)*e)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(e*x+d))/(b**2+2*a*b*sin(e*x+d)+a**2*sin(e*x+d)**2)**(3/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.59743, size = 647, normalized size = 2.71 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(e*x+d))/(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^(3/2),x, algorithm="giac")

[Out]

(a*arctan((b*tan(1/2*x*e + 1/2*d) + a)/sqrt(-a^2 + b^2))/((a^2*sgn(b*tan(1/2*x*e + 1/2*d)^4 + 2*a*tan(1/2*x*e
+ 1/2*d)^3 + 2*b*tan(1/2*x*e + 1/2*d)^2 + 2*a*tan(1/2*x*e + 1/2*d) + b) - b^2*sgn(b*tan(1/2*x*e + 1/2*d)^4 + 2
*a*tan(1/2*x*e + 1/2*d)^3 + 2*b*tan(1/2*x*e + 1/2*d)^2 + 2*a*tan(1/2*x*e + 1/2*d) + b))*sqrt(-a^2 + b^2)) - (2
*a^3*b*tan(1/2*x*e + 1/2*d)^3 - 3*a*b^3*tan(1/2*x*e + 1/2*d)^3 + 2*a^4*tan(1/2*x*e + 1/2*d)^2 - 3*a^2*b^2*tan(
1/2*x*e + 1/2*d)^2 - 2*b^4*tan(1/2*x*e + 1/2*d)^2 + 2*a^3*b*tan(1/2*x*e + 1/2*d) - 5*a*b^3*tan(1/2*x*e + 1/2*d
) + a^2*b^2 - 2*b^4)/((a^2*b^2*sgn(b*tan(1/2*x*e + 1/2*d)^4 + 2*a*tan(1/2*x*e + 1/2*d)^3 + 2*b*tan(1/2*x*e + 1
/2*d)^2 + 2*a*tan(1/2*x*e + 1/2*d) + b) - b^4*sgn(b*tan(1/2*x*e + 1/2*d)^4 + 2*a*tan(1/2*x*e + 1/2*d)^3 + 2*b*
tan(1/2*x*e + 1/2*d)^2 + 2*a*tan(1/2*x*e + 1/2*d) + b))*(b*tan(1/2*x*e + 1/2*d)^2 + 2*a*tan(1/2*x*e + 1/2*d) +
 b)^2))*e^(-1)