\(\int \frac {\cos (c+d x) (A+C \sec ^2(c+d x))}{a+b \sec (c+d x)} \, dx\) [680]

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

Optimal result

Integrand size = 31, antiderivative size = 86 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=-\frac {A b x}{a^2}+\frac {2 \left (A b^2+a^2 C\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^2 \sqrt {a-b} \sqrt {a+b} d}+\frac {A \sin (c+d x)}{a d} \] Output:

-A*b*x/a^2+2*(A*b^2+C*a^2)*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1 
/2))/a^2/(a-b)^(1/2)/(a+b)^(1/2)/d+A*sin(d*x+c)/a/d
 

Mathematica [A] (verified)

Time = 0.35 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.95 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\frac {-A b (c+d x)-\frac {2 \left (A b^2+a^2 C\right ) \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+a A \sin (c+d x)}{a^2 d} \] Input:

Integrate[(Cos[c + d*x]*(A + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x]),x]
 

Output:

(-(A*b*(c + d*x)) - (2*(A*b^2 + a^2*C)*ArcTanh[((-a + b)*Tan[(c + d*x)/2]) 
/Sqrt[a^2 - b^2]])/Sqrt[a^2 - b^2] + a*A*Sin[c + d*x])/(a^2*d)
 

Rubi [A] (verified)

Time = 0.58 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.06, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.290, Rules used = {3042, 4593, 3042, 4407, 3042, 4318, 3042, 3138, 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 {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {A+C \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )}dx\)

\(\Big \downarrow \) 4593

\(\displaystyle \frac {A \sin (c+d x)}{a d}-\frac {\int \frac {A b-a C \sec (c+d x)}{a+b \sec (c+d x)}dx}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {A \sin (c+d x)}{a d}-\frac {\int \frac {A b-a C \csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{a}\)

\(\Big \downarrow \) 4407

\(\displaystyle \frac {A \sin (c+d x)}{a d}-\frac {\frac {A b x}{a}-\frac {\left (a^2 C+A b^2\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)}dx}{a}}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {A \sin (c+d x)}{a d}-\frac {\frac {A b x}{a}-\frac {\left (a^2 C+A b^2\right ) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{a}}{a}\)

\(\Big \downarrow \) 4318

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3138

\(\displaystyle \frac {A \sin (c+d x)}{a d}-\frac {\frac {A b x}{a}-\frac {2 \left (a^2 C+A b^2\right ) \int \frac {1}{\left (1-\frac {a}{b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right )+\frac {a+b}{b}}d\tan \left (\frac {1}{2} (c+d x)\right )}{a b d}}{a}\)

\(\Big \downarrow \) 221

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

Input:

Int[(Cos[c + d*x]*(A + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x]),x]
 

Output:

-(((A*b*x)/a - (2*(A*b^2 + a^2*C)*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/S 
qrt[a + b]])/(a*Sqrt[a - b]*Sqrt[a + b]*d))/a) + (A*Sin[c + d*x])/(a*d)
 

Defintions of rubi rules used

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 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3138
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ 
e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d)   Subst[Int[1/(a + b + 
(a - b)*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 4318
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo 
l] :> Simp[1/b   Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, 
f}, x] && NeQ[a^2 - b^2, 0]
 

rule 4407
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
 (a_)), x_Symbol] :> Simp[c*(x/a), x] - Simp[(b*c - a*d)/a   Int[Csc[e + f* 
x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c 
- a*d, 0]
 

rule 4593
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_. 
))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[A*Co 
t[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*((d*Csc[e + f*x])^n/(a*f*n)), x] + 
Simp[1/(a*d*n)   Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n + 1)*Simp[( 
-A)*b*(m + n + 1) + a*(A + A*n + C*n)*Csc[e + f*x] + A*b*(m + n + 2)*Csc[e 
+ f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, C, m}, x] && NeQ[a^2 - b^2 
, 0] && LeQ[n, -1]
 
Maple [A] (verified)

Time = 0.42 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.26

method result size
derivativedivides \(\frac {-\frac {2 A \left (-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+b \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{a^{2}}-\frac {2 \left (-A \,b^{2}-C \,a^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{2} \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) \(108\)
default \(\frac {-\frac {2 A \left (-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+b \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{a^{2}}-\frac {2 \left (-A \,b^{2}-C \,a^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{2} \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) \(108\)
risch \(-\frac {A b x}{a^{2}}-\frac {i A \,{\mathrm e}^{i \left (d x +c \right )}}{2 a d}+\frac {i A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 a d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) A \,b^{2}}{\sqrt {a^{2}-b^{2}}\, d \,a^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) C}{\sqrt {a^{2}-b^{2}}\, d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a^{2}-i b^{2}-\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) A \,b^{2}}{\sqrt {a^{2}-b^{2}}\, d \,a^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a^{2}-i b^{2}-\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) C}{\sqrt {a^{2}-b^{2}}\, d}\) \(338\)

Input:

int(cos(d*x+c)*(A+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x,method=_RETURNVERBOSE 
)
 

Output:

1/d*(-2*A/a^2*(-a*tan(1/2*d*x+1/2*c)/(1+tan(1/2*d*x+1/2*c)^2)+b*arctan(tan 
(1/2*d*x+1/2*c)))-2*(-A*b^2-C*a^2)/a^2/((a+b)*(a-b))^(1/2)*arctanh((a-b)*t 
an(1/2*d*x+1/2*c)/((a+b)*(a-b))^(1/2)))
 

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 306, normalized size of antiderivative = 3.56 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\left [-\frac {2 \, {\left (A a^{2} b - A b^{3}\right )} d x - {\left (C a^{2} + A b^{2}\right )} \sqrt {a^{2} - b^{2}} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) + 2 \, a^{2} - b^{2}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + b^{2}}\right ) - 2 \, {\left (A a^{3} - A a b^{2}\right )} \sin \left (d x + c\right )}{2 \, {\left (a^{4} - a^{2} b^{2}\right )} d}, -\frac {{\left (A a^{2} b - A b^{3}\right )} d x - {\left (C a^{2} + A b^{2}\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )}\right ) - {\left (A a^{3} - A a b^{2}\right )} \sin \left (d x + c\right )}{{\left (a^{4} - a^{2} b^{2}\right )} d}\right ] \] Input:

integrate(cos(d*x+c)*(A+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="fri 
cas")
 

Output:

[-1/2*(2*(A*a^2*b - A*b^3)*d*x - (C*a^2 + A*b^2)*sqrt(a^2 - b^2)*log((2*a* 
b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)^2 + 2*sqrt(a^2 - b^2)*(b*cos(d 
*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b*cos(d 
*x + c) + b^2)) - 2*(A*a^3 - A*a*b^2)*sin(d*x + c))/((a^4 - a^2*b^2)*d), - 
((A*a^2*b - A*b^3)*d*x - (C*a^2 + A*b^2)*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^ 
2 + b^2)*(b*cos(d*x + c) + a)/((a^2 - b^2)*sin(d*x + c))) - (A*a^3 - A*a*b 
^2)*sin(d*x + c))/((a^4 - a^2*b^2)*d)]
 

Sympy [F]

\[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\int \frac {\left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \cos {\left (c + d x \right )}}{a + b \sec {\left (c + d x \right )}}\, dx \] Input:

integrate(cos(d*x+c)*(A+C*sec(d*x+c)**2)/(a+b*sec(d*x+c)),x)
 

Output:

Integral((A + C*sec(c + d*x)**2)*cos(c + d*x)/(a + b*sec(c + d*x)), x)
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\text {Exception raised: ValueError} \] Input:

integrate(cos(d*x+c)*(A+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="max 
ima")
 

Output:

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

Giac [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.58 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=-\frac {\frac {{\left (d x + c\right )} A b}{a^{2}} - \frac {2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a} - \frac {2 \, {\left (C a^{2} + A b^{2}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{\sqrt {-a^{2} + b^{2}} a^{2}}}{d} \] Input:

integrate(cos(d*x+c)*(A+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="gia 
c")
 

Output:

-((d*x + c)*A*b/a^2 - 2*A*tan(1/2*d*x + 1/2*c)/((tan(1/2*d*x + 1/2*c)^2 + 
1)*a) - 2*(C*a^2 + A*b^2)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b 
) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(-a^2 + 
b^2)))/(sqrt(-a^2 + b^2)*a^2))/d
 

Mupad [B] (verification not implemented)

Time = 12.75 (sec) , antiderivative size = 1560, normalized size of antiderivative = 18.14 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\text {Too large to display} \] Input:

int((cos(c + d*x)*(A + C/cos(c + d*x)^2))/(a + b/cos(c + d*x)),x)
 

Output:

(2*A*b^3*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/(d*(a^4 - a^2*b^2)) 
+ (A*a^3*sin(c + d*x))/(d*(a^4 - a^2*b^2)) - (A*a*b^2*sin(c + d*x))/(d*(a^ 
4 - a^2*b^2)) - (2*A*a^2*b*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/(d 
*(a^4 - a^2*b^2)) + (A*b^2*atan((A^2*b^5*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(3 
/2)*2i + A^2*b^7*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*2i - C^2*a^7*sin(c/2 
 + (d*x)/2)*(a^2 - b^2)^(1/2)*1i + C^2*a^4*b*sin(c/2 + (d*x)/2)*(a^2 - b^2 
)^(3/2)*2i - C^2*a^6*b*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*1i - A^2*a^2*b 
^5*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*3i + A^2*a^3*b^4*sin(c/2 + (d*x)/2 
)*(a^2 - b^2)^(1/2)*1i + A^2*a^4*b^3*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)* 
1i - A^2*a^5*b^2*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*1i + C^2*a^4*b^3*sin 
(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*1i + C^2*a^5*b^2*sin(c/2 + (d*x)/2)*(a^2 
 - b^2)^(1/2)*1i + A*C*a^2*b^3*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(3/2)*4i + A 
*C*a^2*b^5*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*2i + A*C*a^3*b^4*sin(c/2 + 
 (d*x)/2)*(a^2 - b^2)^(1/2)*2i - A*C*a^4*b^3*sin(c/2 + (d*x)/2)*(a^2 - b^2 
)^(1/2)*2i - A*C*a^5*b^2*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*2i)/(C^2*a^8 
*cos(c/2 + (d*x)/2) + A^2*a^2*b^6*cos(c/2 + (d*x)/2) - 2*A^2*a^4*b^4*cos(c 
/2 + (d*x)/2) + A^2*a^6*b^2*cos(c/2 + (d*x)/2) + C^2*a^4*b^4*cos(c/2 + (d* 
x)/2) - 2*C^2*a^6*b^2*cos(c/2 + (d*x)/2) + 2*A*C*a^2*b^6*cos(c/2 + (d*x)/2 
) - 4*A*C*a^4*b^4*cos(c/2 + (d*x)/2) + 2*A*C*a^6*b^2*cos(c/2 + (d*x)/2)))* 
(a^2 - b^2)^(1/2)*2i)/(d*(a^4 - a^2*b^2)) + (C*a^2*atan((A^2*b^5*sin(c/...
                                                                                    
                                                                                    
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 172, normalized size of antiderivative = 2.00 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\frac {2 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b}{\sqrt {-a^{2}+b^{2}}}\right ) a c +2 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b}{\sqrt {-a^{2}+b^{2}}}\right ) b^{2}+\sin \left (d x +c \right ) a^{3}-\sin \left (d x +c \right ) a \,b^{2}-a^{2} b c -a^{2} b d x +b^{3} c +b^{3} d x}{a d \left (a^{2}-b^{2}\right )} \] Input:

int(cos(d*x+c)*(A+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x)
 

Output:

(2*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqr 
t( - a**2 + b**2))*a*c + 2*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - 
 tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*b**2 + sin(c + d*x)*a**3 - sin( 
c + d*x)*a*b**2 - a**2*b*c - a**2*b*d*x + b**3*c + b**3*d*x)/(a*d*(a**2 - 
b**2))